summaryrefslogtreecommitdiffstats
path: root/test/scanf/test_scanfblocks.rb
diff options
context:
space:
mode:
authordblack <dblack@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-02 11:21:32 +0000
committerdblack <dblack@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-02 11:21:32 +0000
commit7150dfb3224d43de26f039e0621db564b82ee6f4 (patch)
tree01110ddab32c8b0cc54c70039ed3465651cc88e5 /test/scanf/test_scanfblocks.rb
parent0d2e1b5ed39a8692e0ae63bc3190cb452d6b2615 (diff)
downloadruby-7150dfb3224d43de26f039e0621db564b82ee6f4.tar.gz
ruby-7150dfb3224d43de26f039e0621db564b82ee6f4.tar.xz
ruby-7150dfb3224d43de26f039e0621db564b82ee6f4.zip
Fixed to work with Ruby test suite (patch from Nobu)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 6b9945a15..861c36a5a 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