summaryrefslogtreecommitdiff
path: root/test/scanf/test_scanfio.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/scanf/test_scanfio.rb')
-rw-r--r--test/scanf/test_scanfio.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/scanf/test_scanfio.rb b/test/scanf/test_scanfio.rb
index c8740aed43..969a8ad773 100644
--- a/test/scanf/test_scanfio.rb
+++ b/test/scanf/test_scanfio.rb
@@ -7,13 +7,14 @@
require "scanf"
-class TestScanfIO
+class TestScanfIO < Test::Unit::TestCase
def test_io
fh = File.new(File.join(File.dirname(__FILE__), "data.txt"), "r")
assert_equal(0, fh.pos)
assert_equal(["this", "is"], fh.scanf("%s%s"))
- assert_equal([33, "littel"], fh.scanf("%da fun%s"))
- #p fh.pos
+ assert_equal([33, "little"], fh.scanf("%da fun%s"))
+ ensure
+ fh.close
end
end