diff --git a/ChangeLog b/ChangeLog index 0d18bc6240..20db99c5ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Feb 24 18:03:14 2004 Nobuyoshi Nakada + + * test/ruby/test_file.rb (test_fnmatch): test for dir.c:1.108. + Tue Feb 24 17:07:17 Hirokazu Yamamoto * dir.c (fnmatch): File.fnmatch with FNM_PATHNAME was broken @@ -17,7 +21,7 @@ Tue Feb 24 07:23:30 2004 Dave Thomas Tue Feb 24 06:40:14 2004 Dave Thomas - * lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_identifier): Handle + * lib/rdoc/parsers/parse_rb.rb (RubyLex::identify_identifier): Handle class variables in code listings Tue Feb 24 06:32:27 2004 Dave Thomas @@ -32,7 +36,7 @@ Tue Feb 24 06:16:22 2004 Dave Thomas Tue Feb 24 06:08:47 2004 Dave Thomas - * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_constant): + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_constant): Start collecting text of constant values earlier: was missing values in output if there was no space after '=' diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb index c4095428e1..c8bc747a58 100644 --- a/test/ruby/test_file.rb +++ b/test/ruby/test_file.rb @@ -14,15 +14,9 @@ class TestFile < Test::Unit::TestCase r = File.open(filename, "r") begin if /(mswin|bccwin|mingw|emx)/ =~ RUBY_PLATFORM - begin - File.unlink(filename) - assert(false) - rescue Errno::EACCES - assert(true) - end + assert_raise(Errno::EACCES) {File.unlink(filename)} else - File.unlink(filename) - assert(true) + assert_nothing_raised {File.unlink(filename)} end ensure r.close @@ -43,7 +37,11 @@ class TestFile < Test::Unit::TestCase def test_fnmatch # from [ruby-dev:22815] and [ruby-dev:22819] - assert(true, File.fnmatch('\[1\]' , '[1]')) - assert(true, File.fnmatch('*?', 'a')) + assert(File.fnmatch('\[1\]' , '[1]')) + assert(File.fnmatch('*?', 'a')) + assert(File.fnmatch('*/', 'a/')) + assert(File.fnmatch('\[1\]' , '[1]', File::FNM_PATHNAME)) + assert(File.fnmatch('*?', 'a', File::FNM_PATHNAME)) + assert(File.fnmatch('*/', 'a/', File::FNM_PATHNAME)) end end