File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -423,7 +423,6 @@ doc:2:test_obvious_equality_with_assert_not_equals()
423423 Running test_obvious_inequality_with_assert_not_equals ... SUCCESS
424424```
425425
426- ##############################
427426=== *assert_matches*
428427
429428 assert_matches <expected-regex> <actual> [message]
@@ -472,7 +471,31 @@ doc:2:test_obvious_matching_with_assert_not_matches()
472471 Running test_obvious_notmatching_with_assert_not_matches ... SUCCESS
473472```
474473
475- ##############################
474+ === *assert_no_diff*
475+
476+ assert_no_diff <expected> <actual> [message]
477+
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+ ```
497+
498+
476499== *fake* function
477500
478501 fake <command> [replacement code]
You can’t perform that action at this time.
0 commit comments