pgrange/bash_unit

Error in readme.adoc

Closed this issue · 2 comments

in readme.adoc :

assert_fail
assert_fail [message]
Asserts that assertion fails. This is the opposite of assert.
assertion fails if its evaluation returns a status code different from 0.

it's more like this :

assertion fails if its evaluation returns a status code egal to 0.

You're confirming that behavior?

I do not agree. Might be confusing but documentation is correct.

By the way, your extract from documentation is missing assertion:

assert_fail <assertion> [message]

So assert_fail succeeds if assertion fails. And assertion fails if its status code is different from 0.

Is it clearer stated like that ?

Yes, it is clearer.
My mistake was to confuse the status code of the assertion function (assert_fail) with the assertion.
Sorry for the inconvenience.