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

Add a uitest subcommand to simplify UI test invocation #3748

merged 1 commit into from Feb 9, 2019
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+5 −3
Diff settings


Just for now

Copy path View file
@@ -0,0 +1,2 @@
uitest = "test --test compile-test"
Copy path View file
@@ -101,7 +101,7 @@ fn main() {

Now you run `TESTNAME=ui/my_lint cargo test --test compile-test` to produce
Now you run `TESTNAME=ui/my_lint cargo uitest` to produce
a `.stdout` file with the generated code:

@@ -151,7 +151,7 @@ Use `cargo test` to run the whole testsuite.
If you don't want to wait for all tests to finish, you can also execute a single test file by using `TESTNAME` to specify the test to run:

TESTNAME=ui/empty_line_after_outer_attr cargo test --test compile-test
TESTNAME=ui/empty_line_after_outer_attr cargo uitest

Clippy uses UI tests. UI tests check that the output of the compiler is exactly as expected.
@@ -25,7 +25,7 @@ use syntax::ast::{Attribute, LitKind, DUMMY_NODE_ID};
/// }
/// ```
/// Running `TESTNAME=ui/my_lint cargo test --test compile-test` will produce
/// Running `TESTNAME=ui/my_lint cargo uitest` will produce
/// a `./tests/ui/new_lint.stdout` file with the generated code:
/// ```rust
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.