mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fixed to work with Ruby test suite (patch from Nobu)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5aad820604
commit
760691ca01
3 changed files with 56 additions and 65 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue