4 class TestShellwords < Test::Unit::TestCase
9 @not_string = Class.new
10 @cmd = "ruby my_prog.rb | less"
15 assert_instance_of(Array, shellwords(@cmd))
16 assert_equal(4, shellwords(@cmd).length)
19 def test_unmatched_double_quote
20 bad_cmd = 'one two "three'
21 assert_raises ArgumentError do
26 def test_unmatched_single_quote
27 bad_cmd = "one two 'three"
28 assert_raises ArgumentError do
33 def test_unmatched_quotes
34 bad_cmd = "one '"'"''""'""
35 assert_raises ArgumentError do