Skip to content

Commit c7a0a3b

Browse files
authored
Merge pull request #143 from Muscraft/color-tests
Use colors in snapshot tests
2 parents 43a10aa + a687aff commit c7a0a3b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+696
-593
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ anstyle = "1.0.4"
2828
unicode-width = "0.1.11"
2929

3030
[dev-dependencies]
31+
annotate-snippets = { path = ".", features = ["testing-colors"] }
3132
anstream = "0.6.13"
3233
criterion = "0.5.1"
3334
difference = "2.0.0"

tests/fixtures/color/ann_eof.svg

Lines changed: 36 additions & 0 deletions
Loading

tests/fixtures/no-color/ann_eof.toml renamed to tests/fixtures/color/ann_eof.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ origin = "Cargo.toml"
1010
label = ""
1111
level = "Error"
1212
range = [4, 4]
13+
14+
[renderer]
15+
color = true
Lines changed: 36 additions & 0 deletions
Loading

tests/fixtures/no-color/ann_insertion.toml renamed to tests/fixtures/color/ann_insertion.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ origin = "Cargo.toml"
1010
label = "'d' belongs here"
1111
level = "Error"
1212
range = [2, 2]
13+
14+
[renderer]
15+
color = true
Lines changed: 42 additions & 0 deletions
Loading

tests/fixtures/no-color/ann_multiline.toml renamed to tests/fixtures/color/ann_multiline.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ fold = false
1616
label = "missing fields `lineno`, `content`"
1717
level = "Error"
1818
range = [31, 128]
19+
20+
[renderer]
21+
color = true
Lines changed: 40 additions & 0 deletions
Loading

tests/fixtures/no-color/ann_multiline2.toml renamed to tests/fixtures/color/ann_multiline2.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ fold = false
1616
label = "this should not be on separate lines"
1717
level = "Error"
1818
range = [11, 19]
19+
20+
[renderer]
21+
color = true

0 commit comments

Comments
 (0)