summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--lib/test/unit/collector/dir.rb5
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 <nobu@ruby-lang.org>
+
+ * 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 <matz@ruby-lang.org>
* 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)