Skip to content

Commit cf1e1d0

Browse files
authored
Merge pull request #338 from RalfJung/colored
bump colored and MSRV
2 parents 120f03b + b90b774 commit cf1e1d0

File tree

13 files changed

+97
-504
lines changed

13 files changed

+97
-504
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
## Running the test suite
22

3-
Running `cargo test` will automatically update the `.stderr`
4-
and `.stdout` files.
3+
The test suite is confusing because it itself runs ui-test, and then also uses ui-test to
4+
check that ui-test produces the right results.
5+
6+
Running `cargo test` will automatically update the "inner" `.stderr` and `.stdout` files.
57

68
If you only want to check that the output files match and not
79
update them, use `cargo test -- -- --check`
10+
11+
To bless the "outer" `.stderr` and `.stdout` files, use `cargo test -- -- --bless`.

Cargo.lock

Lines changed: 12 additions & 79 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ edition = "2021"
55
license = "MIT OR Apache-2.0"
66
description = "A test framework for testing rustc diagnostics output"
77
repository = "https://github.com/oli-obk/ui_test"
8-
rust-version = "1.78"
8+
rust-version = "1.80"
99

1010
[lib]
1111
test = true # we have unit tests
1212
doctest = false # but no doc tests
1313

1414
[dependencies]
1515
rustc_version = "0.4"
16-
colored = "2"
16+
colored = "3"
1717
serde = { version = "1.0", features = ["derive"] }
1818
serde_json = "1.0"
1919
cargo_metadata = { version = "0.18", optional = true }

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ their command specifies, or the test will fail without even being run.
7878
* `//@rustc-env: XXX=YYY` sets the env var `XXX` to `YYY` for the rustc driver execution.
7979
* for Miri these env vars are used during compilation via rustc and during the emulation of the program
8080
* you can specify this multiple times, accumulating all the env vars
81-
* `//@normalize-stdout-test: "REGEX" -> "REPLACEMENT"` / `//@normalize-stderr-test: "REGEX" -> "REPLACEMENT"` replaces all matches of `REGEX` in the stdout/stderr with `REPLACEMENT`. The replacement may specify `$1` and similar backreferences to paste captures. Note that this
82-
doesn't apply to error strings specified by `//~` comments.
81+
* `//@normalize-stdout-test: "REGEX" -> "REPLACEMENT"` / `//@normalize-stderr-test: "REGEX" -> "REPLACEMENT"` replaces all matches of `REGEX` in the stdout/stderr with `REPLACEMENT`. The replacement may specify `$1` and similar backreferences to paste captures. Note that this doesn't apply to error strings specified by `//~` comments.
8382
* you can specify multiple such commands, there is no need to create a single regex that handles multiple replacements that you want to perform.
8483
* `//@require-annotations-for-level: LEVEL` can be used to change the level of diagnostics that require a corresponding annotation.
8584
* this is only useful if there are any annotations like `HELP`, `WARN` or `NOTE`, as these would automatically require annotations for all other diagnostics of the same or higher level.

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "1.78"
2+
channel = "1.80"
33
components = [ "rustfmt", "clippy", "rust-src" ]
44
profile = "minimal"

tests/integrations/basic-bin/Cargo.lock

Lines changed: 6 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)