Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
## Running the test suite

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

Running `cargo test` will automatically update the "inner" `.stderr` and `.stdout` files.

If you only want to check that the output files match and not
update them, use `cargo test -- -- --check`

To bless the "outer" `.stderr` and `.stdout` files, use `cargo test -- -- --bless`.
91 changes: 12 additions & 79 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ edition = "2021"
license = "MIT OR Apache-2.0"
description = "A test framework for testing rustc diagnostics output"
repository = "https://github.com/oli-obk/ui_test"
rust-version = "1.78"
rust-version = "1.80"

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

[dependencies]
rustc_version = "0.4"
colored = "2"
colored = "3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
cargo_metadata = { version = "0.18", optional = true }
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ their command specifies, or the test will fail without even being run.
* `//@rustc-env: XXX=YYY` sets the env var `XXX` to `YYY` for the rustc driver execution.
* for Miri these env vars are used during compilation via rustc and during the emulation of the program
* you can specify this multiple times, accumulating all the env vars
* `//@normalize-stderr-test: "REGEX" -> "REPLACEMENT"` replaces all matches of `REGEX` in the 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.
* `//@normalize-stderr-test: "REGEX" -> "REPLACEMENT"` replaces all matches of `REGEX` in the 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.
* you can specify multiple such commands, there is no need to create a single regex that handles multiple replacements that you want to perform.
* `//@require-annotations-for-level: LEVEL` can be used to change the level of diagnostics that require a corresponding annotation.
* 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.
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.78"
channel = "1.80"
components = [ "rustfmt", "clippy", "rust-src" ]
profile = "minimal"
50 changes: 6 additions & 44 deletions tests/integrations/basic-bin/Cargo.lock

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

Loading
Loading