add a test to verify that compile-flags are provided last

This commit is contained in:
Pietro Albini 2022-10-24 09:56:05 +02:00
parent 6457df3d4b
commit 954649069f
No known key found for this signature in database
GPG key ID: CD76B35F7734769E
3 changed files with 9 additions and 1 deletions

View 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

View file

@ -0,0 +1,2 @@
error: Argument to option 'cap-lints' missing

View file

@ -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) {