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 | 6670d5c3abe1e8a3b3b549c5eb710dbaeb402027 (patch) | |
| tree | 092e4838bf4d94d7c99780b984c1d734c533eaab /test/ruby | |
| parent | 19842730050fa56c1abb97bf3412f2a73312401f (diff) | |
| download | ruby-6670d5c3abe1e8a3b3b549c5eb710dbaeb402027.tar.gz ruby-6670d5c3abe1e8a3b3b549c5eb710dbaeb402027.tar.xz ruby-6670d5c3abe1e8a3b3b549c5eb710dbaeb402027.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@5261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -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 71eb7ad18..a19f6ef9b 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 |
