home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
ruby164.zip
/
rbemx164.zip
/
ruby
/
share
/
doc
/
rdtool-0.6.10
/
test
/
test-search-file.rb
< prev
next >
Wrap
Text File
|
2001-03-20
|
727b
|
28 lines
require 'runit/testcase'
require 'runit/cui/mytestrunner'
require 'rd/search-file'
include RD
class TestSearchFile < RUNIT::TestCase
include SearchFile
def test_search_file
include_path = ["test/data/sub", "test/data"]
suffixes = ["xhtml", "html"]
assert_equal("test/data/includee1.html",
search_file("includee1", include_path, suffixes))
assert_equal("test/data/sub/includee2.html",
search_file("includee2", include_path, suffixes))
assert_equal(nil,
search_file("includee3", include_path, suffixes))
assert_equal("test/data/sub/includee4.html",
search_file("includee4", include_path, suffixes))
end
end
if $0 == __FILE__
RUNIT::CUI::MyTestRunner.run(TestSearchFile.suite)
end