Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update in-source docs #25

Merged
merged 5 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
docs tweaks
  • Loading branch information
jasonkarns committed Jan 30, 2019
commit 7dd271811ec3980d03f937a62dbb1958a7ee665a
2 changes: 1 addition & 1 deletion src/assert_failure.bash
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# --
# ```
#
# #### Expected status
# ## Expected status
#
# When `expected_status` is provided, fail if `$status` does not equal the `expected_status`.
#
Expand Down
10 changes: 5 additions & 5 deletions src/assert_line.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# 1 - otherwise
#
# Similarly to `assert_output`, this function verifies that a command or function produces the expected output.
# (Logical complement of `refute_line`)
# (It is the logical complement of `refute_line`.)
# It checks that the expected line appears in the output (default) or at a specific line number.
# Matching can be literal (default), partial or regular expression.
#
Expand All @@ -32,7 +32,7 @@
#
# [bats-93]: https://github.com/sstephenson/bats/pull/93
#
# #### Looking for a line in the output
# ## Looking for a line in the output
#
# By default, the entire output is searched for the expected line.
# The assertion fails if the expected line is not found in `${lines[@]}`.
Expand All @@ -56,7 +56,7 @@
# --
# ```
#
# #### Matching a specific line
# ## Matching a specific line
#
# When the `--index <idx>` option is used (`-n <idx>` for short), the expected line is matched only against the line identified by the given index.
# The assertion fails if the expected line does not equal `${lines[<idx>]}`.
Expand All @@ -78,7 +78,7 @@
# --
# ```
#
# #### Partial matching
# ## Partial matching
#
# Partial matching can be enabled with the `--partial` option (`-p` for short).
# When used, a match fails if the expected *substring* is not found in the matched line.
Expand All @@ -102,7 +102,7 @@
# --
# ```
#
# #### Regular expression matching
# ## Regular expression matching
#
# 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.
Expand Down
12 changes: 6 additions & 6 deletions src/assert_output.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
# 1 - otherwise
#
# This function verifies that a command or function produces the expected output.
# (Logical complement of `refute_output`)
# (It is the logical complement of `refute_output`.)
# Output matching can be literal (the default), partial or by regular expression.
# The expected output can be specified either by positional argument or from STDIN by passing `-`/`--stdin` flag.
# The expected output can be specified either by positional argument or read from STDIN by passing the `-`/`--stdin` flag.
#
# #### Literal matching
# ## Literal matching
#
# By default, literal matching is performed.
# The assertion fails if `$output` does not equal the expected output.
Expand Down Expand Up @@ -57,7 +57,7 @@
# --
# ```
#
# #### Existence
# ## Existence
#
# To assert that any output exists at all, omit the `expected` argument.
#
Expand All @@ -76,7 +76,7 @@
# --
# ```
#
# #### Partial matching
# ## Partial matching
#
# Partial matching can be enabled with the `--partial` option (`-p` for short).
# When used, the assertion fails if the expected _substring_ is not found in `$output`.
Expand All @@ -97,7 +97,7 @@
# --
# ```
#
# #### Regular expression matching
# ## Regular expression matching
#
# 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`.
Expand Down
10 changes: 5 additions & 5 deletions src/refute_line.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# 1 - otherwise
#
# Similarly to `refute_output`, this function verifies that a command or function does not produce the unexpected output.
# (Logical complement of `assert_line`)
# (It is the logical complement of `assert_line`.)
# It checks that the unexpected line does not appear in the output (default) or at a specific line number.
# Matching can be literal (default), partial or regular expression.
#
Expand All @@ -32,7 +32,7 @@
#
# [bats-93]: https://github.com/sstephenson/bats/pull/93
#
# #### Looking for a line in the output
# ## Looking for a line in the output
#
# By default, the entire output is searched for the unexpected line.
# The assertion fails if the unexpected line is found in `${lines[@]}`.
Expand All @@ -57,7 +57,7 @@
# --
# ```
#
# #### Matching a specific line
# ## Matching a specific line
#
# When the `--index <idx>` option is used (`-n <idx>` for short), the unexpected line is matched only against the line identified by the given index.
# The assertion fails if the unexpected line equals `${lines[<idx>]}`.
Expand All @@ -78,7 +78,7 @@
# --
# ```
#
# #### Partial matching
# ## Partial matching
#
# Partial matching can be enabled with the `--partial` option (`-p` for short).
# When used, a match fails if the unexpected *substring* is found in the matched line.
Expand All @@ -104,7 +104,7 @@
# --
# ```
#
# #### Regular expression matching
# ## Regular expression matching
#
# 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.
Expand Down
17 changes: 8 additions & 9 deletions src/refute_output.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
# 1 - otherwise
#
# This function verifies that a command or function does not produce the unexpected output.
# (Logical complement of `assert_output`)
# (It is the logical complement of `assert_output`.)
# Output matching can be literal (the default), partial or by regular expression.
# The unexpected output can be specified either by positional argument or from STDIN by passing `-`/`--stdin` flag.

# #### Literal matching
# The unexpected output can be specified either by positional argument or read from STDIN by passing the `-`/`--stdin` flag.
#
# ## Literal matching
#
# By default, literal matching is performed.
# The assertion fails if `$output` equals the unexpected output.
Expand Down Expand Up @@ -56,7 +56,7 @@
# --
# ```
#
# #### Existence
# ## Existence
#
# To assert that there is no output at all, omit the matching argument.
#
Expand All @@ -74,7 +74,8 @@
# expected no output, but output was non-empty
# --
# ```
# #### Partial matching
#
# ## Partial matching
#
# Partial matching can be enabled with the `--partial` option (`-p` for short).
# When used, the assertion fails if the unexpected _substring_ is found in `$output`.
Expand All @@ -95,9 +96,7 @@
# --
# ```
#
#
#
# #### Regular expression matching
# ## Regular expression matching
#
# 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`.
Expand Down