diff --git a/t/CMDTEST_stdxxx_equal.rb b/t/CMDTEST_stdxxx_equal.rb index 9db0088..f1a7355 100644 --- a/t/CMDTEST_stdxxx_equal.rb +++ b/t/CMDTEST_stdxxx_equal.rb @@ -181,6 +181,36 @@ class CMDTEST_stdxxx_equal < Cmdtest::Testcase end end + #---------------------------------------- + + ## methods: test_stdout_equal_DIFF test_stderr_equal_DIFF + + define_method("test_#{stdxxx}_equal_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_diff do + stdout_equal [ + "### echo_#{stdxxx}.rb --lines 11 33 44 55-changed 66 77 88", + "--- ERROR: wrong #{stdxxx}", + "--- 11", + "--- - 22", + "--- 33", + "--- 44", + "--- - 55", + "--- + 55-changed", + "--- 66", + "--- 77", + "--- + 88", + ] + exit_nonzero + end + end + #---------------------------------------- # stdxxx_not_equal #----------------------------------------