зеркало из https://github.com/github/ruby.git
* lib/test/unit/collector/dir.rb: add support for directory name
with -p/-x options. * test/testunit/collector/test_dir.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
964171ebfa
Коммит
e6a0f42c94
|
@ -1,3 +1,10 @@
|
|||
Fri Nov 19 11:10:16 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* lib/test/unit/collector/dir.rb: add support for directory name
|
||||
with -p/-x options.
|
||||
|
||||
* test/testunit/collector/test_dir.rb: ditto.
|
||||
|
||||
Fri Nov 19 10:32:36 2004 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* ext/readline/readline.c (readline_s_set_completion_append_character):
|
||||
|
|
|
@ -15,7 +15,7 @@ module Test
|
|||
@file = file
|
||||
@object_space = object_space
|
||||
@req = req
|
||||
@pattern = /\Atest_.*\.rb\Z/m
|
||||
@pattern = /\btest_.*\.rb\Z/m
|
||||
@exclude = nil
|
||||
end
|
||||
|
||||
|
@ -55,8 +55,8 @@ module Test
|
|||
sub_suite = recursive_collect(e_name, already_gathered)
|
||||
sub_suites << sub_suite unless(sub_suite.empty?)
|
||||
else
|
||||
(next unless(@pattern =~ e)) if(@pattern)
|
||||
(next if(@exclude =~ e)) if(@exclude)
|
||||
(next unless(@pattern =~ e_name)) if(@pattern)
|
||||
(next if(@exclude =~ e_name)) if(@exclude)
|
||||
collect_file(e_name, sub_suites, already_gathered)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -385,7 +385,7 @@ module Test
|
|||
expected = TestSuite.new('[d1, d2]')
|
||||
expected << (TestSuite.new('d1') << @t3.suite)
|
||||
expected << (TestSuite.new('d2') << @t5.suite)
|
||||
@c.pattern = /^test_/
|
||||
@c.pattern = /\btest_/
|
||||
assert_equal(expected, @c.collect('d1', 'd2'))
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче