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:
Johan Holmberg 2017-12-20 10:22:32 +01:00
parent 0880d93778
commit f59ee18820
3 changed files with 6 additions and 6 deletions

View File

@ -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

View 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",

View File

@ -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",
]