Sha256: 07ba75a2bea03dc7de19eb9bf705d4ec25593a7237f5cb5d5e2cafe3e0bf8694
Contents?: true
Size: 724 Bytes
Versions: 18
Compression:
Stored size: 724 Bytes
Contents
#!/usr/bin/env ruby require 'test/unit' require 'rubygems'; require 'require_relative' require_relative '../../io/input' # Test Trepan::UserInput class TestIOInput < Test::Unit::TestCase def test_UserInput inp = Trepan::UserInput.open(__FILE__) assert inp, 'Should have gotten a Trepan::UserInput object back' line = inp.readline.chomp assert_equal '#!/usr/bin/env ruby', line assert_equal false, inp.eof? inp.close assert_equal true, inp.closed? inp = Trepan::UserInput.open(__FILE__) while not inp.eof? begin inp.readline rescue EOFError assert_equal(true, inp.eof?, 'EOF should be true after EOFError') end end end end
Version data entries
18 entries across 18 versions & 2 rubygems