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

Diff for: Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+1
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"

Diff for: tests/fixtures/color/ann_eof.svg

+36
Loading

Diff for: tests/fixtures/no-color/ann_eof.toml renamed to tests/fixtures/color/ann_eof.toml

+3
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

Diff for: tests/fixtures/color/ann_insertion.svg

+36
Loading

Diff for: tests/fixtures/no-color/ann_insertion.toml renamed to tests/fixtures/color/ann_insertion.toml

+3
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

Diff for: tests/fixtures/color/ann_multiline.svg

+42
Loading

Diff for: tests/fixtures/no-color/ann_multiline.toml renamed to tests/fixtures/color/ann_multiline.toml

+3
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

Diff for: tests/fixtures/color/ann_multiline2.svg

+40
Loading

Diff for: tests/fixtures/no-color/ann_multiline2.toml renamed to tests/fixtures/color/ann_multiline2.toml

+3
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

Diff for: tests/fixtures/color/ann_removed_nl.svg

+36
Loading

Diff for: tests/fixtures/no-color/ann_removed_nl.toml renamed to tests/fixtures/color/ann_removed_nl.toml

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

Diff for: tests/fixtures/no-color/ensure-emoji-highlight-width.toml renamed to tests/fixtures/color/ensure-emoji-highlight-width.toml

+3
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ origin = "<file>"
1313
label = ""
1414
level = "Error"
1515
range = [0, 35]
16+
17+
[renderer]
18+
color = true

Diff for: tests/fixtures/color/fold_ann_multiline.svg

+49
Loading

Diff for: tests/fixtures/no-color/fold_ann_multiline.toml renamed to tests/fixtures/color/fold_ann_multiline.toml

+3
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ range = [5, 19]
3939
label = "expected enum `std::option::Option`, found ()"
4040
level = "Error"
4141
range = [22, 766]
42+
43+
[renderer]
44+
color = true

Diff for: tests/fixtures/color/fold_bad_origin_line.svg

+37
Loading

Diff for: tests/fixtures/no-color/fold_bad_origin_line.toml renamed to tests/fixtures/color/fold_bad_origin_line.toml

+3
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ fold = true
1515
label = "error here"
1616
level = "Warning"
1717
range = [2,16]
18+
19+
[renderer]
20+
color = true

0 commit comments

Comments
 (0)