summaryrefslogtreecommitdiff
path: root/test/ruby/test_fnmatch.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_fnmatch.rb')
-rw-r--r--test/ruby/test_fnmatch.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_fnmatch.rb b/test/ruby/test_fnmatch.rb
index ca01a28698..30250b5a19 100644
--- a/test/ruby/test_fnmatch.rb
+++ b/test/ruby/test_fnmatch.rb
@@ -129,4 +129,10 @@ class TestFnmatch < Test::Unit::TestCase
assert_file.fnmatch("[a-\u3042]*", "\u3042")
assert_file.not_fnmatch("[a-\u3042]*", "\u3043")
end
+
+ def test_nullchar
+ assert_raise(ArgumentError) {
+ File.fnmatch("a\0z", "a")
+ }
+ end
end