提交 9bc99b4f 编写于 作者: A Aaron Patterson

add a test for whitespace separated args in the rc file

上级 b0645ea0
......@@ -75,6 +75,22 @@ def test_new_homedir_rc
file.unlink
end
def test_rc_whitespace_separated
file = Tempfile.new 'myrcfile'
file.puts '--hello --world'
file.flush
message = nil
scrubber = Class.new(ARGVScrubber) {
define_method(:puts) { |msg| message = msg }
}.new ['new', "--rc=#{file.path}"]
args = scrubber.prepare!
assert_equal ['--hello', '--world'], args
ensure
file.close
file.unlink
end
def test_new_rc_option
file = Tempfile.new 'myrcfile'
file.puts '--hello-world'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册