-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[target-spec-miette] add colors to snapshots
A little harder to read, but more useful.
- Loading branch information
1 parent
f750135
commit 10066d2
Showing
11 changed files
with
56 additions
and
52 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
14 changes: 7 additions & 7 deletions
14
...ec-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-arch.json-display.snap
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
--- | ||
source: target-spec-miette/tests/snapshot/custom.rs | ||
source: target-spec-miette/tests/datatest-snapshot/custom.rs | ||
expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" | ||
snapshot_kind: text | ||
--- | ||
× error deserializing custom target JSON for `my-target` | ||
[31m×[0m error deserializing custom target JSON for `my-target` | ||
╭─[2:13] | ||
1 │ { | ||
2 │ "arch": 123, | ||
· ▲ | ||
· ╰── invalid type: integer `123`, expected a string | ||
3 │ "cpu": "x86-64", | ||
[2m1[0m │ { | ||
[2m2[0m │ "arch": 123, | ||
· [35;1m ▲[0m | ||
· [35;1m╰── [35;1minvalid type: integer `123`, expected a string[0m[0m | ||
[2m3[0m │ "cpu": "x86-64", | ||
╰──── |
14 changes: 7 additions & 7 deletions
14
...-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-endian.json-display.snap
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
--- | ||
source: target-spec-miette/tests/snapshot/custom.rs | ||
source: target-spec-miette/tests/datatest-snapshot/custom.rs | ||
expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" | ||
snapshot_kind: text | ||
--- | ||
× error deserializing custom target JSON for `my-target` | ||
[31m×[0m error deserializing custom target JSON for `my-target` | ||
╭─[32:29] | ||
31 │ }, | ||
32 │ "target-endian": "middle", | ||
· ▲ | ||
· ╰── unknown variant `middle`, expected `little` or `big` | ||
33 │ "target-family": ["unix"], | ||
[2m31[0m │ }, | ||
[2m32[0m │ "target-endian": "middle", | ||
· [35;1m ▲[0m | ||
· [35;1m╰── [35;1munknown variant `middle`, expected `little` or `big`[0m[0m | ||
[2m33[0m │ "target-family": ["unix"], | ||
╰──── |
14 changes: 7 additions & 7 deletions
14
...-miette/tests/datatest-snapshot/snapshots/custom-invalid/invalid-family.json-display.snap
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
--- | ||
source: target-spec-miette/tests/snapshot/custom.rs | ||
source: target-spec-miette/tests/datatest-snapshot/custom.rs | ||
expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" | ||
snapshot_kind: text | ||
--- | ||
× error deserializing custom target JSON for `my-target` | ||
[31m×[0m error deserializing custom target JSON for `my-target` | ||
╭─[33:27] | ||
32 │ "target-endian": "big", | ||
33 │ "target-family": "none", | ||
· ▲ | ||
· ╰── invalid type: string "none", expected a sequence | ||
34 │ "target-mcount": "_mcount", | ||
[2m32[0m │ "target-endian": "big", | ||
[2m33[0m │ "target-family": "none", | ||
· [35;1m ▲[0m | ||
· [35;1m╰── [35;1minvalid type: string "none", expected a sequence[0m[0m | ||
[2m34[0m │ "target-mcount": "_mcount", | ||
╰──── |
14 changes: 7 additions & 7 deletions
14
...datatest-snapshot/snapshots/custom-invalid/invalid-target-pointer-width.json-display.snap
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
--- | ||
source: target-spec-miette/tests/snapshot/custom.rs | ||
source: target-spec-miette/tests/datatest-snapshot/custom.rs | ||
expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" | ||
snapshot_kind: text | ||
--- | ||
× error deserializing custom target JSON for `my-target` | ||
[31m×[0m error deserializing custom target JSON for `my-target` | ||
╭─[52:30] | ||
51 │ ], | ||
52 │ "target-pointer-width": "xx", | ||
· ▲ | ||
· ╰── error parsing as integer: invalid digit found in string | ||
53 │ "supports-xray": true, | ||
[2m51[0m │ ], | ||
[2m52[0m │ "target-pointer-width": "xx", | ||
· [35;1m ▲[0m | ||
· [35;1m╰── [35;1merror parsing as integer: invalid digit found in string[0m[0m | ||
[2m53[0m │ "supports-xray": true, | ||
╰──── |
12 changes: 6 additions & 6 deletions
12
...ec-miette/tests/datatest-snapshot/snapshots/custom-invalid/missing-arch.json-display.snap
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
--- | ||
source: target-spec-miette/tests/snapshot/custom.rs | ||
source: target-spec-miette/tests/datatest-snapshot/custom.rs | ||
expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" | ||
snapshot_kind: text | ||
--- | ||
× error deserializing custom target JSON for `my-target` | ||
[31m×[0m error deserializing custom target JSON for `my-target` | ||
╭─[35:1] | ||
34 │ "target-pointer-width": "64" | ||
35 │ } | ||
· ▲ | ||
· ╰── missing field `arch` | ||
[2m34[0m │ "target-pointer-width": "64" | ||
[2m35[0m │ } | ||
· [35;1m▲[0m | ||
· [35;1m╰── [35;1mmissing field `arch`[0m[0m | ||
╰──── |
12 changes: 6 additions & 6 deletions
12
...ec-miette/tests/datatest-snapshot/snapshots/custom-invalid/syntax-error.json-display.snap
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
--- | ||
source: target-spec-miette/tests/snapshot/custom.rs | ||
source: target-spec-miette/tests/datatest-snapshot/custom.rs | ||
expression: "format!(\"{:?}\", miette::Report::new_boxed(diagnostic))" | ||
snapshot_kind: text | ||
--- | ||
× error deserializing custom target JSON for `my-target` | ||
[31m×[0m error deserializing custom target JSON for `my-target` | ||
╭─[40:13] | ||
39 │ "leak", | ||
40 │ "memory", | ||
· ▲ | ||
· ╰── EOF while parsing a value | ||
[2m39[0m │ "leak", | ||
[2m40[0m │ "memory", | ||
· [35;1m ▲[0m | ||
· [35;1m╰── [35;1mEOF while parsing a value[0m[0m | ||
╰──── |
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