mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_io_console.rb: flush
* test/io/console/test_io_console.rb: flush to ensure the second data is sent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d21aab2d3e
commit
140daa5212
1 changed files with 4 additions and 0 deletions
|
@ -200,6 +200,7 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do
|
||||||
m.print "a"
|
m.print "a"
|
||||||
s.iflush
|
s.iflush
|
||||||
m.print "b\n"
|
m.print "b\n"
|
||||||
|
m.flush
|
||||||
assert_equal("b\n", s.readpartial(10))
|
assert_equal("b\n", s.readpartial(10))
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -209,6 +210,7 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do
|
||||||
s.print "a"
|
s.print "a"
|
||||||
s.oflush # oflush may be issued after "a" is already sent.
|
s.oflush # oflush may be issued after "a" is already sent.
|
||||||
s.print "b"
|
s.print "b"
|
||||||
|
s.flush
|
||||||
assert_include(["b", "ab"], m.readpartial(10))
|
assert_include(["b", "ab"], m.readpartial(10))
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -218,6 +220,7 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do
|
||||||
m.print "a"
|
m.print "a"
|
||||||
s.ioflush
|
s.ioflush
|
||||||
m.print "b\n"
|
m.print "b\n"
|
||||||
|
m.flush
|
||||||
assert_equal("b\n", s.readpartial(10))
|
assert_equal("b\n", s.readpartial(10))
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -227,6 +230,7 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do
|
||||||
s.print "a"
|
s.print "a"
|
||||||
s.ioflush # ioflush may be issued after "a" is already sent.
|
s.ioflush # ioflush may be issued after "a" is already sent.
|
||||||
s.print "b"
|
s.print "b"
|
||||||
|
s.flush
|
||||||
assert_include(["b", "ab"], m.readpartial(10))
|
assert_include(["b", "ab"], m.readpartial(10))
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue