Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,27 @@ doc:2:test_obvious_matching_with_assert_not_matches()

=== *assert_no_diff*

assert_no_diff <expected-file> <actual-file> [message]
assert_no_diff <expected> <actual> [message]

Asserts that the content of `expected-file` matches the content of `actual-file`.
Asserts that the content of the file _actual_ does not have any differences to the one _expected_.

```test
test_obvious_notmatching_with_assert_no_diff(){
assert_no_diff bash_unit README.adoc "content of 'README.adoc' should be the same as 'bash_unit'"
}
test_obvious_matching_with_assert_assert_no_diff(){
assert_no_diff bash_unit bash_unit
}

```

```output
Running test_obvious_matching_with_assert_assert_no_diff ... SUCCESS
Running test_obvious_notmatching_with_assert_no_diff ... FAILURE
content of 'README.adoc' should be the same as 'bash_unit'
expected 'README.adoc' to be identical to 'bash_unit' but was different
doc:2:test_obvious_notmatching_with_assert_no_diff()
```

== *fake* function

Expand Down