File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -481,7 +481,7 @@ Asserts that the content of the file _actual_ does not have any differences to t
481481
482482```test
483483test_obvious_notmatching_with_assert_no_diff(){
484- assert_no_diff bash_unit README.adoc "content of 'README.adoc' should be the same as 'bash_unit'"
484+ assert_no_diff <(echo foo) <(echo bar)
485485}
486486test_obvious_matching_with_assert_assert_no_diff(){
487487 assert_no_diff bash_unit bash_unit
@@ -492,8 +492,11 @@ test_obvious_matching_with_assert_assert_no_diff(){
492492```output
493493 Running test_obvious_matching_with_assert_assert_no_diff ... SUCCESS
494494 Running test_obvious_notmatching_with_assert_no_diff ... FAILURE
495- content of 'README.adoc' should be the same as 'bash_unit'
496- expected 'README.adoc' to be identical to 'bash_unit' but was different
495+ expected 'doc' to be identical to 'doc' but was different
496+ out> 1c1
497+ out> < foo
498+ out> ---
499+ out> > bar
497500doc:2:test_obvious_notmatching_with_assert_no_diff()
498501```
499502
Original file line number Diff line number Diff line change @@ -149,8 +149,8 @@ assert_no_diff() {
149149 local message=${3:- }
150150 [[ -z $message ]] || message=" $message \n"
151151
152- diff -u " ${expected} " " ${actual} " > /dev/null || \
153- fail " $message expected '${actual} ' to be identical to '${expected} ' but was different"
152+ assert ' diff ' " ${expected} " ' ' " ${actual} " \
153+ " $message expected '" ${actual} " ' to be identical to '" ${expected} " ' but was different"
154154}
155155
156156fake () {
You can’t perform that action at this time.
0 commit comments