diff --git a/src/tests/running.md b/src/tests/running.md index 5e18b8a95..4fe61f30a 100644 --- a/src/tests/running.md +++ b/src/tests/running.md @@ -158,6 +158,21 @@ Note that incremental compilation will use more disk space than usual. If disk space is a concern for you, you might want to check the size of the `build` directory from time to time. +## Running tests with different "compare modes" + +UI tests may have different output depending on certain "modes" that +the compiler is in. For example, when in "non-lexical lifetimes" (NLL) +mode a test `foo.rs` will first look for expected output in +`foo.nll.stderr`, falling back to the usual `foo.stderr` if not found. +To run the UI test suite in NLL mode, one would use the following: + +```bash +./x.py test src/test/ui --compare-mode=nll +``` + +Other examples of compare-modes are "noopt", "migrate", and +[revisions](./adding.html#revisions). + ## Running tests manually Sometimes it's easier and faster to just run the test by hand. Most tests are