about summary refs log tree commit homepage
path: root/test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test.rb')
-rwxr-xr-xtest.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test.rb b/test.rb
index b7bcb69..1ffb570 100755
--- a/test.rb
+++ b/test.rb
@@ -22,6 +22,10 @@ class MahoroTestCase < Test::Unit::TestCase
                 }.include?(@m.file('mahoro.c')))
         end
 
+        def test_null_byte_in_path
+                assert_raises(ArgumentError) { @m.file("mahoro.c\0foo") }
+        end
+
         def test_buffer
                 @m.flags = Mahoro::NONE
                 assert_equal('ASCII C program text',