* test/io/console/test_io_console.rb (test_getpass): s.getpass
should be tested. Narrow ensure block. This reverts r52911. [Bug #11780] [ruby-dev:49412] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
be801955e9
commit
14c46e5f1a
@ -1,3 +1,9 @@
|
||||
Tue Dec 8 12:58:04 2015 Naohisa Goto <ngotogenome@gmail.com>
|
||||
|
||||
* test/io/console/test_io_console.rb (test_getpass): s.getpass
|
||||
should be tested. Narrow ensure block. This reverts r52911.
|
||||
[Bug #11780] [ruby-dev:49412]
|
||||
|
||||
Tue Dec 8 10:40:21 2015 Eric Wong <e@80x24.org>
|
||||
|
||||
* benchmark/bm_vm2_case_lit.rb: new benchmark
|
||||
|
@ -181,18 +181,18 @@ class TestIO_Console < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_getpass
|
||||
th = nil
|
||||
helper {|m, s|
|
||||
th = Thread.start {
|
||||
sleep 0.1
|
||||
s.print "asdf\n"
|
||||
}
|
||||
assert_equal("asdf", m.getpass)
|
||||
assert_equal("\n", s.readpartial(2))
|
||||
th.join
|
||||
begin
|
||||
th = Thread.start {
|
||||
sleep 0.1
|
||||
m.print "asdf\n"
|
||||
}
|
||||
assert_equal("asdf", s.getpass("> "))
|
||||
assert_equal("> \r\n", m.readpartial(10))
|
||||
ensure
|
||||
th.join rescue nil
|
||||
end
|
||||
}
|
||||
ensure
|
||||
th.join rescue nil
|
||||
end
|
||||
|
||||
def test_iflush
|
||||
|
Loading…
x
Reference in New Issue
Block a user