mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
[ruby/io-console] Reject incomplete JRuby cursor responses
https://github.com/ruby/io-console/commit/27fde7fdd9
This commit is contained in:
1 parent
9f8e0e106d
commit
6d2cfeea4a
1 file changed
+10
@@ -467,6 +467,8 @@ class TestIO_Console
|
||||
con.cursor_right(4); con.puts
|
||||
con.cursor_left(2); con.puts
|
||||
con.cursor_up(1); con.puts
|
||||
p con.cursor
|
||||
p con.cursor
|
||||
end;
|
||||
assert_equal("\e[6n", r.readpartial(5))
|
||||
w.print("\e[12;34R"); w.flush
|
||||
@@ -475,6 +477,14 @@ class TestIO_Console
|
||||
assert_equal("\e[4C", r.gets.chomp)
|
||||
assert_equal("\e[2D", r.gets.chomp)
|
||||
assert_equal("\e[1A", r.gets.chomp)
|
||||
|
||||
assert_equal("\e[6n", r.readpartial(5))
|
||||
w.print("\e[12R"); w.flush
|
||||
assert_equal("nil", r.gets.chomp)
|
||||
|
||||
assert_equal("\e[6n", r.readpartial(5))
|
||||
w.print("\e[12;34;56R"); w.flush
|
||||
assert_equal("nil", r.gets.chomp)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user