diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-14 16:04:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-14 16:04:16 +0000 |
commit | 499d04674c64e71afd7350648803513d183d1afe (patch) | |
tree | 22ea6ffc2e6acbfbb5aba133c68bcc6f6db1bf41 /lib/test | |
parent | 1b4f46a7f02517374e4a995e54f0e7428a506014 (diff) | |
download | ruby-499d04674c64e71afd7350648803513d183d1afe.tar.gz |
* lib/test/unit/collector/dir.rb (Collector::Dir#collect): append base
directory but not prepend.
* lib/test/unit/collector/dir.rb (Collector::Dir#collect_file): do not
join with dot. fixed: [ruby-core:09179]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test')
-rw-r--r-- | lib/test/unit/collector/dir.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/test/unit/collector/dir.rb b/lib/test/unit/collector/dir.rb index 4e553db4df..97c8d28481 100644 --- a/lib/test/unit/collector/dir.rb +++ b/lib/test/unit/collector/dir.rb @@ -22,7 +22,7 @@ module Test def collect(*from) basedir = @base - $:.unshift(basedir) if basedir + $:.push(basedir) if basedir if(from.empty?) recursive_collect('.', find_test_cases) elsif(from.size == 1) @@ -54,9 +54,10 @@ module Test sub_suites = [] path = realdir(name) if @file.directory?(path) + dir_name = name unless name == '.' @dir.entries(path).each do |e| next if(e == '.' || e == '..') - e_name = @file.join(name, e) + e_name = dir_name ? @file.join(dir_name, e) : e if @file.directory?(realdir(e_name)) next if /\ACVS\z/ =~ e sub_suite = recursive_collect(e_name, already_gathered) |