summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/shellwords.rb7
-rw-r--r--test/test_shellwords.rb16
3 files changed, 20 insertions, 8 deletions
@@ -1,3 +1,8 @@
Sun Dec 13 12:17:43 2015 Eric Wong <[email protected]>
* lib/shellwords.rb (shellescape): duplicate frozen literal
@@ -64,6 +64,13 @@ module Shellwords
# argv = Shellwords.split('here are "two words"')
# argv #=> ["here", "are", "two words"]
#
# String#shellsplit is a shortcut for this function.
#
# argv = 'here are "two words"'.shellsplit
@@ -6,15 +6,15 @@ class TestShellwords < Test::Unit::TestCase
include Shellwords
- def setup
- @not_string = Class.new
- @cmd = "ruby my_prog.rb | less"
- end
-
- def test_string
- assert_instance_of(Array, shellwords(@cmd))
- assert_equal(4, shellwords(@cmd).length)
end
def test_unmatched_double_quote