add a test to verify that compile-flags are provided last
This commit is contained in:
parent
6457df3d4b
commit
954649069f
3 changed files with 9 additions and 1 deletions
6
src/test/ui/compiletest-compile-flags-last.rs
Normal file
6
src/test/ui/compiletest-compile-flags-last.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// Check that the arguments provided through `// compile-flags` are added last to the command line
|
||||
// in UI tests. To ensure that we invoke rustc with a flag that expects an argument withut actually
|
||||
// providing it. If the compile-flags are not last, the test will fail as rustc will interpret the
|
||||
// next flag as the argument of this flag.
|
||||
//
|
||||
// compile-flags: --cap-lints
|
||||
2
src/test/ui/compiletest-compile-flags-last.stderr
Normal file
2
src/test/ui/compiletest-compile-flags-last.stderr
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
error: Argument to option 'cap-lints' missing
|
||||
|
||||
|
|
@ -7,7 +7,7 @@ use std::path::Path;
|
|||
|
||||
const ENTRY_LIMIT: usize = 1000;
|
||||
// FIXME: The following limits should be reduced eventually.
|
||||
const ROOT_ENTRY_LIMIT: usize = 948;
|
||||
const ROOT_ENTRY_LIMIT: usize = 949;
|
||||
const ISSUES_ENTRY_LIMIT: usize = 2117;
|
||||
|
||||
fn check_entries(path: &Path, bad: &mut bool) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue