diff options
Diffstat (limited to 'test/ruby/test_whileuntil.rb')
| -rw-r--r-- | test/ruby/test_whileuntil.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/ruby/test_whileuntil.rb b/test/ruby/test_whileuntil.rb index 121c44817d..5628317cb8 100644 --- a/test/ruby/test_whileuntil.rb +++ b/test/ruby/test_whileuntil.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: false require 'test/unit' require 'tmpdir' @@ -22,7 +21,7 @@ class TestWhileuntil < Test::Unit::TestCase break if /vt100/ =~ line end - assert_not_predicate(tmp, :eof?) + assert(!tmp.eof?) assert_match(/vt100/, line) tmp.close @@ -31,7 +30,7 @@ class TestWhileuntil < Test::Unit::TestCase next if /vt100/ =~ line assert_no_match(/vt100/, line) end - assert_predicate(tmp, :eof?) + assert(tmp.eof?) assert_no_match(/vt100/, line) tmp.close @@ -46,7 +45,7 @@ class TestWhileuntil < Test::Unit::TestCase assert_no_match(/vt100/, line) assert_no_match(/VT100/, line) end - assert_predicate(tmp, :eof?) + assert(tmp.eof?) tmp.close sum=0 @@ -61,7 +60,7 @@ class TestWhileuntil < Test::Unit::TestCase tmp = open(tmpfilename, "r") while line = tmp.gets() - break if $. == 3 + break if 3 assert_no_match(/vt100/, line) assert_no_match(/Amiga/, line) assert_no_match(/paper/, line) @@ -69,7 +68,7 @@ class TestWhileuntil < Test::Unit::TestCase tmp.close File.unlink tmpfilename or `/bin/rm -f "#{tmpfilename}"` - assert_file.not_exist?(tmpfilename) + assert(!File.exist?(tmpfilename)) } end @@ -78,6 +77,6 @@ class TestWhileuntil < Test::Unit::TestCase until i>4 i+=1 end - assert_operator(i, :>, 4) + assert(i>4) end end |
