Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bats-core/bats-assert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Karns <jason@karns.name>2016-02-19 20:00:18 +0300
committerJason Karns <jason@karns.name>2016-02-24 17:43:51 +0300
commit94988734ca1d4debbc72ec6c13337860846710bd (patch)
tree1aa019c3e09a6e432dd562b59326559196281aec /README.md
parentf861a59dc88c7b195c87618ef79a918f700319f6 (diff)
Add refute assertion
Diffstat (limited to 'README.md')
-rw-r--r--README.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/README.md b/README.md
index b341a8b..5636351 100644
--- a/README.md
+++ b/README.md
@@ -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