diff options
author | Jason Karns <jason.karns@gmail.com> | 2023-02-23 05:30:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 05:30:32 +0300 |
commit | 0beceef482244d02519595cb81ac5cbf6686f664 (patch) | |
tree | 9a7f7a5ecba3b561d169497e5b1ae0b17345c550 | |
parent | caafab69f63ef5fc734f3ede2c4a81bd8dc7498d (diff) |
Update README.md
-rw-r--r-- | README.md | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -63,7 +63,7 @@ refute_line -- '--' Fail if the given expression evaluates to false. -> _**Note** +> _**Note**: > The expression must be a simple command. > [Compound commands][bash-comp-cmd], such as `[[`, can be used only when executed with `bash -c`._ @@ -294,7 +294,7 @@ An error is displayed when used simultaneously. Regular expression matching can be enabled with the `--regexp` option (`-e` for short). When used, the assertion fails if the *extended regular expression* does not match `$output`. -> _**Note** +> _**Note**: > The anchors `^` and `$` bind to the beginning and the end of the entire output (not individual lines), respectively._ ```bash @@ -411,7 +411,7 @@ An error is displayed when used simultaneously. Regular expression matching can be enabled with the `--regexp` option (`-e` for short). When used, the assertion fails if the *extended regular expression* matches `$output`. -> _**Note** +> _**Note**: > The anchors `^` and `$` bind to the beginning and the end of the entire output (not individual lines), respectively._ ```bash @@ -459,8 +459,9 @@ It checks that the expected line appears in the output (default) or in a specifi Matching can be literal (default), partial or regular expression. This function is the logical complement of `refute_line`. -***Warning:*** -*Due to a [bug in Bats][bats-93], empty lines are discarded from `${lines[@]}`, causing line indices to change and preventing testing for empty lines.* +> _**Warning**: +> Due to a [bug in Bats][bats-93], empty lines are discarded from `${lines[@]}`, +> causing line indices to change and preventing testing for empty lines._ [bats-93]: https://github.com/sstephenson/bats/pull/93 @@ -478,7 +479,7 @@ The assertion fails if the expected line is not found in `${lines[@]}`. On failure, the expected line and the output are displayed. -> _**Warning** +> _**Warning**: > The output displayed does not contain empty lines. > See the Warning above for more._ @@ -548,7 +549,7 @@ An error is displayed when used simultaneously. Regular expression matching can be enabled with the `--regexp` option (`-e` for short). When used, a match fails if the *extended regular expression* does not match the line being tested. -> _**Note** +> _**Note**: > As expected, the anchors `^` and `$` bind to the beginning and the end of the matched line, respectively._ ```bash @@ -581,7 +582,7 @@ It checks that the unexpected line does not appear in the output (default) or in Matching can be literal (default), partial or regular expression. This function is the logical complement of `assert_line`. -> _**Warning** +> _**Warning**: > Due to a [bug in Bats][bats-93], empty lines are discarded from `${lines[@]}`, > causing line indices to change and preventing testing for empty lines._ @@ -601,7 +602,7 @@ The assertion fails if the unexpected line is found in `${lines[@]}`. On failure, the unexpected line, the index of its first match and the output with the matching line highlighted are displayed. -> _**Warning** +> _**Warning**: > The output displayed does not contain empty lines. > See the Warning above for more._ @@ -673,7 +674,7 @@ An error is displayed when used simultaneously. Regular expression matching can be enabled with the `--regexp` option (`-e` for short). When used, a match fails if the *extended regular expression* matches the line being tested. -> _**Note** +> _**Note**: > As expected, the anchors `^` and `$` bind to the beginning and the end of the matched line, respectively._ ```bash @@ -730,7 +731,7 @@ An error is displayed if the specified extended regular expression is invalid. For description of the matching behavior, refer to the documentation of the `=~` operator in the [Bash manual][bash-conditional]. -> _**Note** +> _**Note**: > the `BASH_REMATCH` array is available immediately after the assertion succeeds but is fragile; > i.e. prone to being overwritten as a side effect of other actions._ @@ -770,7 +771,7 @@ An error is displayed if the specified extended regular expression is invalid. For description of the matching behavior, refer to the documentation of the `=~` operator in the [Bash manual][bash-conditional]. -> _**Note** +> _**Note**: > the `BASH_REMATCH` array is available immediately after the assertion fails but is fragile; > i.e. prone to being overwritten as a side effect of other actions like calling `run`. > Thus, it's good practice to avoid using `BASH_REMATCH` in conjunction with `refute_regex()`. |