aboutsummaryrefslogtreecommitdiffstats
path: root/test/scanf/test_scanfblocks.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/scanf/test_scanfblocks.rb')
-rw-r--r--test/scanf/test_scanfblocks.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/scanf/test_scanfblocks.rb b/test/scanf/test_scanfblocks.rb
index 6b9945a159..861c36a5a6 100644
--- a/test/scanf/test_scanfblocks.rb
+++ b/test/scanf/test_scanfblocks.rb
@@ -5,11 +5,10 @@
# Some not very comprehensive tests of block behavior.
-$:.unshift("..")
require 'test/unit'
-require 'scanf.rb'
+require 'scanf'
-class TestMe < Test::Unit::TestCase
+class TestScanfBlock < Test::Unit::TestCase
def setup
@str = <<-EOS
@@ -61,7 +60,8 @@ alias set_up setup
"Scarlatti was born in 1685.",
"Brahms was born in 1833." ],res)
fh.close
-# File.delete("iotest.dat")
+ ensure
+ File.delete("iotest.dat")
end
def test_io2
@@ -71,7 +71,8 @@ alias set_up setup
fh.seek(0)
assert_equal(fh.scanf("%d%f%s") {}, [])
fh.close
- # File.delete("iotest.dat")
+ ensure
+ File.delete("iotest.dat")
end
end