File tree 2 files changed +8
-5
lines changed
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
481
481
482
482
```test
483
483
test_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)
485
485
}
486
486
test_obvious_matching_with_assert_assert_no_diff(){
487
487
assert_no_diff bash_unit bash_unit
@@ -492,8 +492,11 @@ test_obvious_matching_with_assert_assert_no_diff(){
492
492
```output
493
493
Running test_obvious_matching_with_assert_assert_no_diff ... SUCCESS
494
494
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
497
500
doc:2:test_obvious_notmatching_with_assert_no_diff()
498
501
```
499
502
Original file line number Diff line number Diff line change @@ -149,8 +149,8 @@ assert_no_diff() {
149
149
local message=${3:- }
150
150
[[ -z $message ]] || message=" $message \n"
151
151
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"
154
154
}
155
155
156
156
fake () {
You can’t perform that action at this time.
0 commit comments