summaryrefslogtreecommitdiff
path: root/test/test_shellwords.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_shellwords.rb')
-rw-r--r--test/test_shellwords.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_shellwords.rb b/test/test_shellwords.rb
index 16949c02d3..86971b7237 100644
--- a/test/test_shellwords.rb
+++ b/test/test_shellwords.rb
@@ -68,6 +68,11 @@ class TestShellwords < Test::Unit::TestCase
assert_equal "ps -p #{$$}", joined
end
+ def test_shellescape
+ assert_equal "''", shellescape('')
+ assert_equal "\\^AZaz09_\\\\-.,:/@'\n'+\\'\\\"", shellescape("^AZaz09_\\-.,:\/@\n+'\"")
+ end
+
def test_whitespace
empty = ''
space = " "