From 499d04674c64e71afd7350648803513d183d1afe Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 14 Oct 2006 16:04:16 +0000 Subject: [PATCH] * 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 --- ChangeLog | 8 ++++++++ lib/test/unit/collector/dir.rb | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8bb6b7f175..1c43ed680f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sun Oct 15 01:03:08 2006 Nobuyoshi Nakada + + * 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] + Sat Oct 14 23:39:50 2006 Yukihiro Matsumoto * parse.y (singleton): no need to re-create NODE_SELF() again. 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)