Skip to content

Commit fc1518e

Browse files
authored
fix: Make UI tests handle hyperlinks consistently (#15640)
In #15639, @weihanglo noted that one of the lint tests passed in CI, but locally it would fail as it had a hyperlink added to its output. The root cause appears to be the recent update to `[email protected]`, which added support for hyperlinks, combined with our hyperlink support autodetection, disabling them in CI, but allowing them locally. To ensure we are consistently handling hyperlinks, I made them always enabled for UI tests. This seemed like the best option given that we already force colors for UI tests, and it allows us to test our hyperlink output.
2 parents 6040018 + ccbe572 commit fc1518e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

crates/cargo-test-support/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,6 +1505,7 @@ impl CargoCommandExt for snapbox::cmd::Command {
15051505
Self::new(cargo_exe())
15061506
.with_assert(compare::assert_ui())
15071507
.env("CARGO_TERM_COLOR", "always")
1508+
.env("CARGO_TERM_HYPERLINKS", "true")
15081509
.test_env()
15091510
}
15101511
}

tests/testsuite/lints/warning/stderr.term.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)