improve message text in 'file_equal'
now use "ERROR: wrong content of file 'foo'" instead of earlier "ERROR: wrong file 'foo'"
This commit is contained in:
parent
0880d93778
commit
f59ee18820
@ -555,7 +555,7 @@ module Cmdtest
|
||||
|
||||
def _file_equal_aux(positive, file, expected)
|
||||
_process_after do
|
||||
what = "file '#{file}'"
|
||||
what = "content of file '#{file}'"
|
||||
actual = _read_file(what, file)
|
||||
case actual
|
||||
when :no_such_file
|
||||
|
@ -41,7 +41,7 @@ class CMDTEST_file_equal < Cmdtest::Testcase
|
||||
cmd_cmdtest do
|
||||
stdout_equal [
|
||||
"### true.rb",
|
||||
"--- ERROR: wrong file 'foo'",
|
||||
"--- ERROR: wrong content of file 'foo'",
|
||||
"--- actual: hello world",
|
||||
"--- expect: [[empty]]",
|
||||
]
|
||||
@ -88,7 +88,7 @@ class CMDTEST_file_equal < Cmdtest::Testcase
|
||||
cmd_cmdtest do
|
||||
stdout_equal [
|
||||
"### true.rb",
|
||||
"--- ERROR: wrong file 'foo'",
|
||||
"--- ERROR: wrong content of file 'foo'",
|
||||
"--- actual: hello world",
|
||||
"--- expect: [[empty]]",
|
||||
]
|
||||
@ -132,7 +132,7 @@ class CMDTEST_file_equal < Cmdtest::Testcase
|
||||
cmd_cmdtest do
|
||||
stdout_equal [
|
||||
"### true.rb",
|
||||
"--- ERROR: wrong file 'foo'",
|
||||
"--- ERROR: wrong content of file 'foo'",
|
||||
"--- actual: [[empty]]",
|
||||
"--- expect: hello world",
|
||||
]
|
||||
@ -176,7 +176,7 @@ class CMDTEST_file_equal < Cmdtest::Testcase
|
||||
cmd_cmdtest do
|
||||
stdout_equal [
|
||||
"### true.rb",
|
||||
"--- ERROR: wrong file 'foo'",
|
||||
"--- ERROR: wrong content of file 'foo'",
|
||||
"--- actual: [[empty]]",
|
||||
"--- expect: hello",
|
||||
"--- world",
|
||||
|
@ -40,7 +40,7 @@ class CMDTEST_file_not_equal < Cmdtest::Testcase
|
||||
cmd_cmdtest do
|
||||
stdout_equal [
|
||||
"### true.rb",
|
||||
"--- ERROR: wrong file 'foo'",
|
||||
"--- ERROR: wrong content of file 'foo'",
|
||||
"--- actual: hello",
|
||||
"--- expect: hello",
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user