Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(cli): Verify terminal styling #13461

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 41 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ sha1 = "0.10.6"
sha2 = "0.10.8"
shell-escape = "0.1.5"
supports-hyperlinks = "2.1.0"
snapbox = { version = "0.5.0", features = ["diff", "path"] }
snapbox = { version = "0.5.6", features = ["diff", "path", "term-svg"] }
tar = { version = "0.4.40", default-features = false }
tempfile = "3.9.0"
thiserror = "1.0.56"
Expand Down
1 change: 1 addition & 0 deletions crates/cargo-test-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,7 @@ impl CargoCommand for snapbox::cmd::Command {
fn cargo_ui() -> Self {
Self::new(cargo_exe())
.with_assert(compare::assert_ui())
.env("CARGO_TERM_COLOR", "always")
.test_env()
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo/help/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ fn case() {
.arg("--help")
.assert()
.success()
.stdout_matches(file!["stdout.log"])
.stdout_matches(file!["stdout.term.svg"])
.stderr_matches(str![""]);
}
40 changes: 0 additions & 40 deletions tests/testsuite/cargo/help/stdout.log

This file was deleted.

106 changes: 106 additions & 0 deletions tests/testsuite/cargo/help/stdout.term.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testsuite/cargo/z_help/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ fn case() {
.args(["-Z", "help"])
.assert()
.success()
.stdout_matches(file!["stdout.log"])
.stdout_matches(file!["stdout.term.svg"])
.stderr_matches(str![""]);
}
38 changes: 0 additions & 38 deletions tests/testsuite/cargo/z_help/stdout.log

This file was deleted.

Loading