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

Version Path
rbx-trepanning-0.2.1-universal-rubinius-2.0 test/unit/test-io-input.rb
rbx-trepanning-0.2.1-universal-rubinius-1.2 test/unit/test-io-input.rb
rbx-trepanning-0.2.0-universal-rubinius-2.0 test/unit/test-io-input.rb
rb8-trepanning-0.1.6 test/unit/test-io-input.rb
rb8-trepanning-0.1.5 test/unit/test-io-input.rb
rbx-trepanning-0.1.0-universal-rubinius-1.2 test/unit/test-io-input.rb
rb8-trepanning-0.1.4 test/unit/test-io-input.rb
rb8-trepanning-0.1.3 test/unit/test-io-input.rb
rb8-trepanning-0.1.3-universal-ruby-1.9.2 test/unit/test-io-input.rb
rb8-trepanning-0.1.3-universal-ruby-1.8.7 test/unit/test-io-input.rb
rbx-trepanning-0.0.8-universal-rubinius-1.2 test/unit/test-io-input.rb
rbx-trepanning-0.0.7-universal-rubinius-1.2 test/unit/test-io-input.rb
rbx-trepanning-0.0.6-universal-rubinius-1.2 test/unit/test-io-input.rb
rbx-trepanning-0.0.5-universal-rubinius-1.2.1 test/unit/test-io-input.rb
rbx-trepanning-0.0.4-universal-rubinius-1.2 test/unit/test-io-input.rb
rbx-trepanning-0.0.3-universal-rubinius-1.2 test/unit/test-io-input.rb
rbx-trepanning-0.0.2-universal-rubinius-1.2 test/unit/test-io-input.rb
rbx-trepanning-0.0.1-universal-rubinius test/unit/test-io-input.rb