-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Chore] Tests: golden files, add BATS_ACCEPT
Problem: in golden tests, it was impossible to automatically accept changes en masse, e.g. if formatting changed. Solution: factor out golden files (i.e. don't inline the expected output directly in *.bats) and introduce a BATS_ACCEPT=1 option to update the expected output. The main change is in `assert_diff`, and the rest of the patch updates its use sites accordingly.
- Loading branch information
Showing
37 changed files
with
315 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
=== Invalid references found === | ||
|
||
➥ In file a.md | ||
bad reference (file-local) at src:16:1-43: | ||
- text: "ambiguous anchor in this file" | ||
- anchor: some-text | ||
|
||
Ambiguous reference to anchor 'some-text' | ||
In file a.md | ||
It could refer to either: | ||
- some-text (header I) at src:6:1-11 | ||
- some-text (header I) at src:8:1-15 | ||
- some-text (header II) at src:12:1-12 | ||
Use of ambiguous anchors is discouraged because the target | ||
can change silently while the document containing it evolves. | ||
|
||
➥ In file b.md | ||
bad reference (relative) at src:7:1-48: | ||
- text: "ambiguous anchor in other file" | ||
- link: a.md | ||
- anchor: some-text | ||
|
||
Ambiguous reference to anchor 'some-text' | ||
In file a.md | ||
It could refer to either: | ||
- some-text (header I) at src:6:1-11 | ||
- some-text (header I) at src:8:1-15 | ||
- some-text (header II) at src:12:1-12 | ||
Use of ambiguous anchors is discouraged because the target | ||
can change silently while the document containing it evolves. | ||
|
||
Invalid references dumped, 2 in total. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
=== Invalid references found === | ||
|
||
➥ In file a.md | ||
bad reference (file-local) at src:12:1-13: | ||
- text: "broken" | ||
- anchor: h3 | ||
|
||
Anchor 'h3' is not present, did you mean: | ||
- h1 (header I) at src:6:1-4 | ||
- h2 (header II) at src:8:1-5 | ||
|
||
➥ In file a.md | ||
bad reference (file-local) at src:14:1-18: | ||
- text: "broken" | ||
- anchor: heading | ||
|
||
Anchor 'heading' is not present, did you mean: | ||
- the-heading (header I) at src:10:1-13 | ||
|
||
➥ In file a.md | ||
bad reference (file-local) at src:16:1-31: | ||
- text: "broken" | ||
- anchor: really-unique-anchor | ||
|
||
Anchor 'really-unique-anchor' is not present | ||
|
||
Invalid references dumped, 3 in total. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
=== Repository data === | ||
|
||
file-with-autolinks.md: | ||
- references: | ||
- reference (external): | ||
- text: "https://www.google.com/doodles" | ||
- link: https://www.google.com/doodles | ||
- reference (external) at src:8:0-18: | ||
- text: "www.commonmark.org" | ||
- link: http://www.commonmark.org | ||
- anchors: | ||
none | ||
|
||
=== Invalid references found === | ||
|
||
➥ In file file-with-autolinks.md | ||
bad reference (external) at src:8:0-18: | ||
- text: "www.commonmark.org" | ||
- link: http://www.commonmark.org | ||
|
||
Permanent redirect found: | ||
-| http://www.commonmark.org | ||
-> https://commonmark.org | ||
^-- stopped before this one | ||
|
||
Invalid references dumped, 1 in total. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
=== Invalid references found === | ||
|
||
➥ In file to-ignore/broken-link.md | ||
bad reference (absolute) at src:7:1-25: | ||
- text: "my link" | ||
- link: /one/two/three | ||
- anchor: - | ||
|
||
File does not exist: | ||
one/two/three | ||
|
||
Invalid references dumped, 1 in total. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
=== Invalid references found === | ||
|
||
➥ In file to-ignore/broken-link.md | ||
bad reference (absolute) at src:7:1-25: | ||
- text: "my link" | ||
- link: /one/two/three | ||
- anchor: - | ||
|
||
File does not exist: | ||
one/two/three | ||
|
||
Invalid references dumped, 1 in total. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
=== Invalid references found === | ||
|
||
➥ In file to-ignore/broken-link.md | ||
bad reference (absolute) at src:7:1-25: | ||
- text: "my link" | ||
- link: /one/two/three | ||
- anchor: - | ||
|
||
File does not exist: | ||
one/two/three | ||
|
||
Invalid references dumped, 1 in total. |
Oops, something went wrong.