diff options
Diffstat (limited to 'test/test_shellwords.rb')
| -rw-r--r-- | test/test_shellwords.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_shellwords.rb b/test/test_shellwords.rb index 86971b7237..0020235fdd 100644 --- a/test/test_shellwords.rb +++ b/test/test_shellwords.rb @@ -128,4 +128,13 @@ class TestShellwords < Test::Unit::TestCase # used as shell meta-character that needs to be escaped. assert_equal "\\あ\\い", "あい".shellescape end + + def test_nul_char + assert_raise(ArgumentError) do + shellescape("\0") + end + assert_raise(ArgumentError) do + shelljoin(["\0"]) + end + end end |
