Skip to content

Commit f3e3774

Browse files
authored
Merge pull request sstephenson#179 from bats-core/readme-notes
Consistent 'note' format in readme
2 parents 9b566a7 + d3c985e commit f3e3774

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed

README.md

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,33 +47,37 @@ commit [0360811][]. It was created via `git clone --bare` and `git push
4747

4848
## Table of contents
4949

50+
<!-- toc -->
51+
5052
- [Installation](#installation)
51-
- [Supported Bash versions](#supported-bash-versions)
52-
- [Homebrew](#homebrew)
53-
- [npm](#npm)
54-
- [Installing Bats from source](#installing-bats-from-source)
55-
- [Running Bats in Docker](#running-bats-in-docker)
56-
- [Building a Docker image](#building-a-docker-image)
53+
* [Supported Bash versions](#supported-bash-versions)
54+
* [Homebrew](#homebrew)
55+
* [npm](#npm)
56+
* [Installing Bats from source](#installing-bats-from-source)
57+
* [Running Bats in Docker](#running-bats-in-docker)
58+
+ [Building a Docker image](#building-a-docker-image)
5759
- [Usage](#usage)
5860
- [Writing tests](#writing-tests)
59-
- [`run`: Test other commands](#run-test-other-commands)
60-
- [`load`: Share common code](#load-share-common-code)
61-
- [`skip`: Easily skip tests](#skip-easily-skip-tests)
62-
- [`setup` and `teardown`: Pre- and post-test hooks](#setup-and-teardown-pre--and-post-test-hooks)
63-
- [Code outside of test cases](#code-outside-of-test-cases)
64-
- [File descriptor 3 (read this if Bats hangs)](#file-descriptor-3-read-this-if-bats-hangs)
65-
- [Printing to the terminal](#printing-to-the-terminal)
66-
- [Special variables](#special-variables)
61+
* [`run`: Test other commands](#run-test-other-commands)
62+
* [`load`: Share common code](#load-share-common-code)
63+
* [`skip`: Easily skip tests](#skip-easily-skip-tests)
64+
* [`setup` and `teardown`: Pre- and post-test hooks](#setup-and-teardown-pre--and-post-test-hooks)
65+
* [Code outside of test cases](#code-outside-of-test-cases)
66+
* [File descriptor 3 (read this if Bats hangs)](#file-descriptor-3-read-this-if-bats-hangs)
67+
* [Printing to the terminal](#printing-to-the-terminal)
68+
* [Special variables](#special-variables)
6769
- [Testing](#testing)
6870
- [Support](#support)
6971
- [Contributing](#contributing)
7072
- [Contact](#contact)
7173
- [Version history](#version-history)
7274
- [Background](#background)
73-
- [Why was this fork created?](#why-was-this-fork-created)
74-
- [What's the plan and why?](#whats-the-plan-and-why)
75+
* [Why was this fork created?](#why-was-this-fork-created)
76+
* [What's the plan and why?](#whats-the-plan-and-why)
7577
- [Copyright](#copyright)
7678

79+
<!-- tocstop -->
80+
7781
## Installation
7882

7983
### Supported Bash versions
@@ -132,7 +136,7 @@ install Bats into `/usr/local`,
132136
$ cd bats-core
133137
$ ./install.sh /usr/local
134138

135-
Note that you may need to run `install.sh` with `sudo` if you do not have
139+
__Note:__ You may need to run `install.sh` with `sudo` if you do not have
136140
permission to write to the installation prefix.
137141

138142
### Running Bats in Docker
@@ -249,10 +253,6 @@ command, saves the exit status and output into special global variables, and
249253
then returns with a `0` status code so you can continue to make assertions in
250254
your test case.
251255

252-
> Note that the `run` helper executes its argument(s) in a subshell, so if
253-
> writing tests against environmental side-effects like a variable's value
254-
> being changed, these changes will not persist after `run` completes.
255-
256256
For example, let's say you're testing that the `foo` command, when passed a
257257
nonexistent filename, exits with a `1` status code and prints an error message.
258258

@@ -280,6 +280,10 @@ without any arguments prints usage information on the first line:
280280
}
281281
```
282282

283+
__Note:__ The `run` helper executes its argument(s) in a subshell, so if
284+
writing tests against environmental side-effects like a variable's value
285+
being changed, these changes will not persist after `run` completes.
286+
283287
### `load`: Share common code
284288

285289
You may want to share common code across multiple test files. Bats includes a
@@ -337,7 +341,7 @@ Or you can skip conditionally:
337341
}
338342
```
339343

340-
`setup` and `teardown` hooks still run for skipped tests.
344+
__Note:__ `setup` and `teardown` hooks still run for skipped tests.
341345

342346
### `setup` and `teardown`: Pre- and post-test hooks
343347

0 commit comments

Comments
 (0)