add test of --no-diff option
This commit is contained in:
parent
3c83c52c70
commit
1ed22c3163
@ -211,6 +211,41 @@ class CMDTEST_stdxxx_equal < Cmdtest::Testcase
|
||||
end
|
||||
end
|
||||
|
||||
#----------------------------------------
|
||||
|
||||
## methods: test_stdout_equal_DIFF test_stderr_equal_DIFF
|
||||
|
||||
define_method("test_#{stdxxx}_equal_NO_DIFF") do
|
||||
|
||||
create_CMDTEST_foo [
|
||||
"cmd 'echo_#{stdxxx}.rb --lines 11 33 44 55-changed 66 77 88' do",
|
||||
" #{stdxxx}_equal [ '11', '22', '33', '44', '55', '66', '77' ]",
|
||||
"end",
|
||||
]
|
||||
|
||||
cmd_cmdtest_no_diff do
|
||||
stdout_equal [
|
||||
"### echo_#{stdxxx}.rb --lines 11 33 44 55-changed 66 77 88",
|
||||
"--- ERROR: wrong #{stdxxx}",
|
||||
"--- actual: 11",
|
||||
"--- 33",
|
||||
"--- 44",
|
||||
"--- 55-changed",
|
||||
"--- 66",
|
||||
"--- 77",
|
||||
"--- 88",
|
||||
"--- expect: 11",
|
||||
"--- 22",
|
||||
"--- 33",
|
||||
"--- 44",
|
||||
"--- 55",
|
||||
"--- 66",
|
||||
"--- 77",
|
||||
]
|
||||
exit_nonzero
|
||||
end
|
||||
end
|
||||
|
||||
#----------------------------------------
|
||||
# stdxxx_not_equal
|
||||
#----------------------------------------
|
||||
|
@ -59,6 +59,15 @@ module SelftestUtils
|
||||
end
|
||||
end
|
||||
|
||||
def cmd_cmdtest_no_diff(*args)
|
||||
cmdtest = "#{TOP}/bin/cmdtest.rb"
|
||||
command = "ruby %s --quiet --no-diff" % _quote(cmdtest)
|
||||
cmd(command, *args) do
|
||||
comment "running local cmdtest --no-diff"
|
||||
yield
|
||||
end
|
||||
end
|
||||
|
||||
def cmd_cmdtest_verbose(*args)
|
||||
cmdtest = "#{TOP}/bin/cmdtest.rb"
|
||||
command = "ruby %s %s" % [
|
||||
|
Loading…
x
Reference in New Issue
Block a user