Skip to content

Commit c95f4ac

Browse files
committed
chore: Add sequential numbering to test scripts in markdown files
1 parent 7bb5585 commit c95f4ac

File tree

15 files changed

+154
-154
lines changed

15 files changed

+154
-154
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ practices something that happens without thinking about it.
1313
This works via git hooks, so you need these hooks to be present in the
1414
git repository you're using to use them.
1515

16-
``` shell,script(name="1",expected_exit_code=0)
16+
``` shell,script(name="initialize-repository",expected_exit_code=0)
1717
git init .
1818
git mit-install
1919
```
@@ -36,13 +36,13 @@ recursively from the home directory using this command.
3636
find "$HOME" -type d -name .git -exec sh -c 'git init "$1"/..' -- {} \;
3737
```
3838

39-
### Lint list
39+
### Listing Lints
4040

41-
``` shell,script(name="lint-list",expected_exit_code=0)
41+
``` shell,script(name="list-available-lints",expected_exit_code=0)
4242
git mit-config lint available
4343
```
4444

45-
``` text,verify(script_name="lint-list",stream=stdout)
45+
``` text,verify(script_name="list-available-lints",stream=stdout)
4646
╭───────────────────────────────────┬──────────╮
4747
│ Lint ┆ Status │
4848
╞═══════════════════════════════════╪══════════╡
@@ -72,11 +72,11 @@ git mit-config lint available
7272

7373
With only lints that ensure git will work properly enabled by default
7474

75-
``` shell,script(name="lint-list",expected_exit_code=0)
75+
``` shell,script(name="list-enabled-lints",expected_exit_code=0)
7676
git mit-config lint enabled
7777
```
7878

79-
``` text,verify(script_name="lint-list",stream=stdout)
79+
``` text,verify(script_name="list-enabled-lints",stream=stdout)
8080
╭───────────────────────────────────┬─────────╮
8181
│ Lint ┆ Status │
8282
╞═══════════════════════════════════╪═════════╡
@@ -111,11 +111,11 @@ For example
111111

112112
With this you can enable lints
113113

114-
``` shell,script(name="7",expected_exit_code=0)
114+
``` shell,script(name="check-pivotal-lint-status",expected_exit_code=0)
115115
git mit-config lint status pivotal-tracker-id-missing
116116
```
117117

118-
``` text,verify(script_name="7",stream=stdout)
118+
``` text,verify(script_name="check-pivotal-lint-status",stream=stdout)
119119
╭────────────────────────────┬─────────╮
120120
│ Lint ┆ Status │
121121
╞════════════════════════════╪═════════╡
@@ -144,27 +144,27 @@ This is the best readme
144144

145145
If you run
146146

147-
``` shell,script(name="2",expected_exit_code=0)
147+
``` shell,script(name="set-relates-to-trailer",expected_exit_code=0)
148148
git mit-relates-to "[#12321513]"
149149
```
150150

151151
Next time you commit
152152

153-
``` shell,script(name="3",expected_exit_code=0)
153+
``` shell,script(name="stage-and-set-authors",expected_exit_code=0)
154154
git add README.md
155155
git mit bt
156156
git commit -m "Wrote a great README"
157157
```
158158

159159
the commit message will contain the ID
160160

161-
``` shell,script(name="4",expected_exit_code=0)
161+
``` shell,script(name="show-commit-with-relates-to",expected_exit_code=0)
162162
git show --pretty='format:author: [%an %ae] signed-by: [%GS]
163163
---
164164
%B' -q
165165
```
166166

167-
``` text,verify(script_name="4",stream=stdout)
167+
``` text,verify(script_name="show-commit-with-relates-to",stream=stdout)
168168
author: [Billie Thompson [email protected]] signed-by: []
169169
---
170170
Wrote a great README
@@ -174,19 +174,19 @@ Relates-to: [#12321513]
174174

175175
Read more about this at the [relates to page](docs/mit-relates-to.md)
176176

177-
### Setting Authors and Co-Authors
177+
### Setting Authors and Co-authors
178178

179179
Pairing is a great way to program, and it's even better when you give
180180
credit, you can give credit with the mit command
181181

182182
Configure your authors like the example by creating a config at
183183
`$HOME/.config/git-mit/mit.toml`
184184

185-
``` shell,script(name="3")
185+
``` shell,script(name="generate-example-config",expected_exit_code=0)
186186
git-mit-config mit example
187187
```
188188

189-
``` toml,verify(script_name="3",stream=stdout)
189+
``` toml,verify(script_name="generate-example-config",stream=stdout)
190190
[ae]
191191
name = "Anyone Else"
192192
@@ -203,14 +203,14 @@ email = "[email protected]"
203203

204204
And you can run
205205

206-
``` shell,script(name="6",expected_exit_code=0)
206+
``` shell,script(name="set-multiple-coauthors",expected_exit_code=0)
207207
git mit ae bt se
208208
```
209209

210210
Then next when you make a commit the `Co-authored-by` trailers will be
211211
set of the author initials you selected.
212212

213-
``` shell,script(name="7",expected_exit_code=0)
213+
``` shell,script(name="show-coauthored-commit",expected_exit_code=0)
214214
echo "# Hello, world!" > README.md
215215
216216
git add .
@@ -220,7 +220,7 @@ git show --pretty='format:author: [%an %ae] signed-by: [%GS]
220220
%B' -q
221221
```
222222

223-
``` text,verify(script_name="7",stream=stdout)
223+
``` text,verify(script_name="show-coauthored-commit",stream=stdout)
224224
author: [Anyone Else [email protected]] signed-by: []
225225
---
226226
Initial Commit

docs/binaries/git-mit-config.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Generic usage
44

5-
``` shell,script(expected_exit_code=0)
5+
``` shell,script(name="show-main-help",expected_exit_code=0)
66
git-mit-config --help
77
```
88

9-
``` shell,verify(stream=stdout)
9+
``` shell,verify(script_name="show-main-help",stream=stdout)
1010
A command for enabling and disabling git lints
1111
1212
Usage: git-mit-config [OPTIONS] [COMMAND]
@@ -23,11 +23,11 @@ Options:
2323
-V, --version Print version
2424
```
2525

26-
``` shell,script(expected_exit_code=0)
26+
``` shell,script(name="show-lint-help",expected_exit_code=0)
2727
git-mit-config lint --help
2828
```
2929

30-
``` shell,verify(stream=stdout)
30+
``` shell,verify(script_name="show-lint-help",stream=stdout)
3131
Manage active lints
3232
3333
Usage: git-mit-config lint <COMMAND>
@@ -45,11 +45,11 @@ Options:
4545
-h, --help Print help
4646
```
4747

48-
``` shell,script(expected_exit_code=0)
48+
``` shell,script(name="show-mit-help",expected_exit_code=0)
4949
git-mit-config mit --help
5050
```
5151

52-
``` shell,verify(stream=stdout)
52+
``` shell,verify(script_name="show-mit-help",stream=stdout)
5353
Manage mit configuration
5454
5555
Usage: git-mit-config mit <COMMAND>
@@ -67,11 +67,11 @@ Options:
6767
-h, --help Print help
6868
```
6969

70-
``` shell,script(expected_exit_code=0)
70+
``` shell,script(name="show-relates-to-help",expected_exit_code=0)
7171
git-mit-config relates-to --help
7272
```
7373

74-
``` shell,verify(stream=stdout)
74+
``` shell,verify(script_name="show-relates-to-help",stream=stdout)
7575
Manage relates-to settings
7676
7777
Usage: git-mit-config relates-to <COMMAND>
@@ -86,16 +86,16 @@ Options:
8686

8787
You can generate completion with
8888

89-
``` shell,script(expected_exit_code=0)
89+
``` shell,script(name="generate-bash-completion",expected_exit_code=0)
9090
git-mit-config --completion bash
9191
```
9292

9393
Otherwise an error will be generated
9494

95-
``` shell,script(expected_exit_code=1)
95+
``` shell,script(name="missing-subcommand-error",expected_exit_code=1)
9696
git-mit-config
9797
```
98-
``` shell,verify(stream=stderr)
98+
``` shell,verify(script_name="missing-subcommand-error",stream=stderr)
9999
Error: git_mit_config::errors::unrecognised_lint_command
100100
101101
× unrecognised subcommand

docs/binaries/git-mit-install.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Generic usage
44

5-
``` shell,script(name="run_help",expected_exit_code=0)
5+
``` shell,script(name="run-help",expected_exit_code=0)
66
export HOME="/example/home/dir"
77
export USERPROFILE="F:\\some\\userprofile"
88
git-mit-install --help
99
```
1010

11-
```text,verify(script_name="run_help",target_os="!windows")
11+
```text,verify(script_name="run-help",target_os="!windows")
1212
Install git-mit into a repository
1313
1414
Usage: git-mit-install [OPTIONS]
@@ -36,7 +36,7 @@ Options:
3636

3737
On windows the home directory is different
3838

39-
```text,verify(script_name="run_help",target_os="windows")
39+
```text,verify(script_name="run-help",target_os="windows")
4040
Install git-mit into a repository
4141
4242
Usage: git-mit-install [OPTIONS]
@@ -64,6 +64,6 @@ Options:
6464

6565
You can generate completion with
6666

67-
```shell,script(name="completion",expected_exit_code=0)
67+
```shell,script(name="generate-bash-completion",expected_exit_code=0)
6868
git-mit-install --completion bash
6969
```

docs/binaries/git-mit-relates-to.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Generic usage
44

5-
``` shell,script(expected_exit_code=0)
5+
``` shell,script(name="show-help",expected_exit_code=0)
66
git-mit-relates-to --help
77
```
88

9-
``` shell,verify(stream=stdout)
9+
``` shell,verify(script_name="show-help",stream=stdout)
1010
Set Relates-to trailer.
1111
1212
Usage: git-mit-relates-to [OPTIONS] [ISSUE_NUMBER]
@@ -24,17 +24,17 @@ Options:
2424

2525
You can generate completion with
2626

27-
``` shell,script(expected_exit_code=0)
27+
``` shell,script(name="generate-bash-completion",expected_exit_code=0)
2828
git-mit-relates-to --completion bash
2929
```
3030

3131
Otherwise you need an issue number
3232

33-
``` shell,script(expected_exit_code=2)
33+
``` shell,script(name="missing-issue-number-error",expected_exit_code=2)
3434
git-mit-relates-to
3535
```
3636

37-
``` shell,verify(stream=stderr)
37+
``` shell,verify(script_name="missing-issue-number-error",stream=stderr)
3838
error: the following required arguments were not provided:
3939
<ISSUE_NUMBER>
4040

docs/binaries/git-mit.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Generic usage
44

5-
``` shell,script(expected_exit_code=0)
5+
``` shell,script(name="show-help",expected_exit_code=0)
66
git-mit --help
77
```
88

9-
``` shell,verify(stream=stdout)
9+
``` shell,verify(script_name="show-help",stream=stdout)
1010
Set author and Co-authored trailer.
1111
1212
Usage: git-mit [OPTIONS] [INITIALS]...
@@ -61,16 +61,16 @@ COMMON TASKS:
6161

6262
You can generate completion with
6363

64-
``` shell,script(expected_exit_code=0)
64+
``` shell,script(name="generate-bash-completion",expected_exit_code=0)
6565
git-mit --completion bash
6666
```
6767

6868
Otherwise you must provide an author initial
6969

70-
``` shell,script(expected_exit_code=2)
70+
``` shell,script(name="missing-initials-error",expected_exit_code=2)
7171
git-mit
7272
```
73-
``` shell,verify(stream=stderr)
73+
``` shell,verify(script_name="missing-initials-error",stream=stderr)
7474
error: the following required arguments were not provided:
7575
<INITIALS>...
7676

docs/binaries/mit-commit-msg.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
55
Generic usage
66

7-
``` shell,script(expected_exit_code=0)
7+
``` shell,script(name="show-help",expected_exit_code=0)
88
mit-commit-msg --help
99
```
1010

11-
``` shell,verify(stream=stdout)
11+
``` shell,verify(script_name="show-help",stream=stdout)
1212
Validate the commit message that a user has input
1313
1414
Usage: mit-commit-msg [OPTIONS] [COMMIT_FILE_PATH]
@@ -27,17 +27,17 @@ Options:
2727

2828
You can generate completion with
2929

30-
``` shell,script(expected_exit_code=0)
30+
``` shell,script(name="generate-bash-completion",expected_exit_code=0)
3131
mit-commit-msg --completion bash
3232
```
3333

3434
Otherwise you need an the commit file path
3535

36-
``` shell,script(expected_exit_code=2)
36+
``` shell,script(name="missing-commit-path-error",expected_exit_code=2)
3737
mit-commit-msg
3838
```
3939

40-
``` shell,verify(stream=stderr)
40+
``` shell,verify(script_name="missing-commit-path-error",stream=stderr)
4141
error: the following required arguments were not provided:
4242
<COMMIT_FILE_PATH>
4343

docs/binaries/mit-pre-commit.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
55
Generic usage
66

7-
``` shell,script(expected_exit_code=0)
7+
``` shell,script(name="show-help",expected_exit_code=0)
88
mit-pre-commit --help
99
```
1010

11-
``` shell,verify(stream=stdout)
11+
``` shell,verify(script_name="show-help",stream=stdout)
1212
Run first, before you even type in a commit message. It's used to inspect the snapshot that's about
1313
to be committed.
1414
@@ -22,17 +22,17 @@ Options:
2222

2323
You can generate completion with
2424

25-
``` shell,script(expected_exit_code=0)
25+
``` shell,script(name="generate-bash-completion",expected_exit_code=0)
2626
mit-pre-commit --completion bash
2727
```
2828

2929
Otherwise you need to have configured some authors
3030

31-
``` shell,script(expected_exit_code=1)
31+
``` shell,script(name="no-authors-configured-error",expected_exit_code=1)
3232
mit-pre-commit
3333
```
3434

35-
``` shell,verify(stream=stderr)
35+
``` shell,verify(script_name="no-authors-configured-error",stream=stderr)
3636
Error: mit_pre_commit::errors::stale_author_error
3737
3838
× No authors set

0 commit comments

Comments
 (0)