Skip to content

Commit

Permalink
Fix issue while showing the diagnostic message of EXPECT and EQUAL (#29)
Browse files Browse the repository at this point in the history
Signed-off-by: Aravinda Vishwanathapura <aravinda@kadalu.tech>
  • Loading branch information
aravindavk authored Jul 1, 2022
1 parent b103ec0 commit 3051a07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def EXPECT(expect_value, cmd)
BinnacleTestsRunner.test_end(
cmd,
ok=false,
diagnostic="\"#{expect_value}\"(Expected) != \"#{out.strip}\"(Actual)"
diagnostic="Expected:\n--\n#{expect_value}\n--\nActual:\n--\n#{out.join}\n--\n"
)
exit if BinnacleTestsRunner.exit_on_not_ok?
end
Expand Down Expand Up @@ -381,7 +381,7 @@ def EQUAL(value1, value2, title)
if value1 == value2
BinnacleTestsRunner.test_end(title, ok=true)
else
fail_message = "Value1: #{value1}\nValue2: #{value2}"
fail_message = "Value1:\n--\n#{value1}\n--\n\nValue2:\n--\n#{value2}\n--\n"
BinnacleTestsRunner.test_end(title, ok=false, diagnostic=fail_message)
exit if BinnacleTestsRunner.exit_on_not_ok?
end
Expand Down

0 comments on commit 3051a07

Please sign in to comment.