mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_file.rb (test_fnmatch): test for dir.c:1.108.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
77d7ff7cbe
commit
9af2f9e0da
2 changed files with 14 additions and 12 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Feb 24 18:03:14 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/ruby/test_file.rb (test_fnmatch): test for dir.c:1.108.
|
||||||
|
|
||||||
Tue Feb 24 17:07:17 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
Tue Feb 24 17:07:17 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||||
|
|
||||||
* dir.c (fnmatch): File.fnmatch with FNM_PATHNAME was broken
|
* dir.c (fnmatch): File.fnmatch with FNM_PATHNAME was broken
|
||||||
|
@ -17,7 +21,7 @@ Tue Feb 24 07:23:30 2004 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
Tue Feb 24 06:40:14 2004 Dave Thomas <dave@pragprog.com>
|
Tue Feb 24 06:40:14 2004 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
* 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
|
class variables in code listings
|
||||||
|
|
||||||
Tue Feb 24 06:32:27 2004 Dave Thomas <dave@pragprog.com>
|
Tue Feb 24 06:32:27 2004 Dave Thomas <dave@pragprog.com>
|
||||||
|
@ -32,7 +36,7 @@ Tue Feb 24 06:16:22 2004 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
Tue Feb 24 06:08:47 2004 Dave Thomas <dave@pragprog.com>
|
Tue Feb 24 06:08:47 2004 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
* 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
|
Start collecting text of constant values earlier: was missing
|
||||||
values in output if there was no space after '='
|
values in output if there was no space after '='
|
||||||
|
|
||||||
|
|
|
@ -14,15 +14,9 @@ class TestFile < Test::Unit::TestCase
|
||||||
r = File.open(filename, "r")
|
r = File.open(filename, "r")
|
||||||
begin
|
begin
|
||||||
if /(mswin|bccwin|mingw|emx)/ =~ RUBY_PLATFORM
|
if /(mswin|bccwin|mingw|emx)/ =~ RUBY_PLATFORM
|
||||||
begin
|
assert_raise(Errno::EACCES) {File.unlink(filename)}
|
||||||
File.unlink(filename)
|
|
||||||
assert(false)
|
|
||||||
rescue Errno::EACCES
|
|
||||||
assert(true)
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
File.unlink(filename)
|
assert_nothing_raised {File.unlink(filename)}
|
||||||
assert(true)
|
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
r.close
|
r.close
|
||||||
|
@ -43,7 +37,11 @@ class TestFile < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_fnmatch
|
def test_fnmatch
|
||||||
# from [ruby-dev:22815] and [ruby-dev:22819]
|
# from [ruby-dev:22815] and [ruby-dev:22819]
|
||||||
assert(true, File.fnmatch('\[1\]' , '[1]'))
|
assert(File.fnmatch('\[1\]' , '[1]'))
|
||||||
assert(true, File.fnmatch('*?', 'a'))
|
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue