Skip to content

Commit 2daf685

Browse files
authored
Merge pull request #85 from poWer4aiX/cz-docs
docs: fix assert_(not_)matches, added matches_no_diff
2 parents bd189bb + d8cb3e0 commit 2daf685

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.adoc

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,27 @@ doc:2:test_obvious_matching_with_assert_not_matches()
473473

474474
=== *assert_no_diff*
475475

476-
assert_no_diff <expected-file> <actual-file> [message]
476+
assert_no_diff <expected> <actual> [message]
477477

478-
Asserts that the content of `expected-file` matches the content of `actual-file`.
478+
Asserts that the content of the file _actual_ does not have any differences to the one _expected_.
479+
480+
```test
481+
test_obvious_notmatching_with_assert_no_diff(){
482+
assert_no_diff bash_unit README.adoc "content of 'README.adoc' should be the same as 'bash_unit'"
483+
}
484+
test_obvious_matching_with_assert_assert_no_diff(){
485+
assert_no_diff bash_unit bash_unit
486+
}
487+
488+
```
489+
490+
```output
491+
Running test_obvious_matching_with_assert_assert_no_diff ... SUCCESS
492+
Running test_obvious_notmatching_with_assert_no_diff ... FAILURE
493+
content of 'README.adoc' should be the same as 'bash_unit'
494+
expected 'README.adoc' to be identical to 'bash_unit' but was different
495+
doc:2:test_obvious_notmatching_with_assert_no_diff()
496+
```
479497

480498
== *fake* function
481499

0 commit comments

Comments
 (0)