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
Failed to load comments.
Jump to
Jump to file
Failed to load files.


Just for now

@@ -0,0 +1,2 @@
uitest = "test --test compile-test"
@@ -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.