diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-23 10:43:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-23 10:43:04 +0000 |
commit | 163a6e81b207525e4f35e21464ee5ab3afbd3cb5 (patch) | |
tree | 092e4838bf4d94d7c99780b984c1d734c533eaab /test | |
parent | 44182056f63e877e90f75abcd12df9695311180c (diff) |
* io.c (rb_io_ungetc): raise an exception at unread stream to
avoid unspecified behavior. [ruby-dev:22330]
* test/ruby/test_system.rb (test_syntax): glob relatively from
__FILE__.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_system.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb index 71eb7ad183..a19f6ef9b7 100644 --- a/test/ruby/test_system.rb +++ b/test/ruby/test_system.rb @@ -54,15 +54,11 @@ class TestSystem < Test::Unit::TestCase File.unlink "script_tmp" or `/bin/rm -f "script_tmp"` File.unlink "script_tmp.bak" or `/bin/rm -f "script_tmp.bak"` + end - if (dir = File.dirname(File.dirname($0))) == '.' - dir = "" - else - dir << "/" - end - + def test_syntax assert_nothing_raised(Exception) do - for script in Dir["#{dir}{lib,sample,ext}/**/*.rb"] + for script in Dir[File.expand_path("../../../{lib,sample,ext}/**/*.rb", __FILE__)] valid_syntax? IO::read(script), script end end |