Skip to content

Commit 13d50bc

Browse files
authored
Merge pull request #336 from nia-e/main
readme: doc comments
2 parents a2a10f1 + 64bd8c4 commit 13d50bc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ not run your `fn main()` that actually executes `ui_test`
2828
## Supported comment annotations
2929

3030
If your test tests for failure, you need to add a `//~` annotation where the error is happening
31-
to ensure that the test will always keep failing at the annotated line. These comments can take two forms:
31+
to ensure that the test will always keep failing at the annotated line. This will match any substring
32+
of the error. These comments can take two forms:
3233

3334
* `//~ LEVEL: XXX` matches by error level and message text
3435
* `LEVEL` can be one of the following (descending order): `ERROR`, `HELP`, `WARN`, `NOTE` or `ICE`
@@ -77,7 +78,8 @@ their command specifies, or the test will fail without even being run.
7778
* `//@rustc-env: XXX=YYY` sets the env var `XXX` to `YYY` for the rustc driver execution.
7879
* for Miri these env vars are used during compilation via rustc and during the emulation of the program
7980
* you can specify this multiple times, accumulating all the env vars
80-
* `//@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.
81+
* `//@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
82+
doesn't apply to error strings specified by `//~` comments.
8183
* you can specify multiple such commands, there is no need to create a single regex that handles multiple replacements that you want to perform.
8284
* `//@require-annotations-for-level: LEVEL` can be used to change the level of diagnostics that require a corresponding annotation.
8385
* 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.

0 commit comments

Comments
 (0)