diff options
author | Jason Karns <jason@karns.name> | 2016-02-19 20:00:18 +0300 |
---|---|---|
committer | Jason Karns <jason@karns.name> | 2016-02-24 17:43:51 +0300 |
commit | 94988734ca1d4debbc72ec6c13337860846710bd (patch) | |
tree | 1aa019c3e09a6e432dd562b59326559196281aec /README.md | |
parent | f861a59dc88c7b195c87618ef79a918f700319f6 (diff) |
Add refute assertion
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -73,6 +73,30 @@ expression : [ -e /var/log/test.log ] ``` +### `refute` + +Fail if the given expression evaluates to true. + +***Note:*** *The expression must be a simple command. [Compound +commands][bash-comp-cmd], such as `[[`, can be used only when executed +with `bash -c`.* + +```bash +@test 'refute()' { + rm -f '/var/log/test.log' + refute [ -e '/var/log/test.log' ] +} +``` + +On failure, the successful expression is displayed. + +``` +-- assertion succeeded, but it was expected to fail -- +expression : [ -e /var/log/test.log ] +-- +``` + + ### `assert_equal` Fail if the two parameters, actual and expected value respectively, do |