Skip to content

Commit 9546490

Browse files
committed
add a test to verify that compile-flags are provided last
1 parent 6457df3 commit 9546490

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Check that the arguments provided through `// compile-flags` are added last to the command line
2+
// in UI tests. To ensure that we invoke rustc with a flag that expects an argument withut actually
3+
// providing it. If the compile-flags are not last, the test will fail as rustc will interpret the
4+
// next flag as the argument of this flag.
5+
//
6+
// compile-flags: --cap-lints
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: Argument to option 'cap-lints' missing
2+

src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::path::Path;
77

88
const ENTRY_LIMIT: usize = 1000;
99
// FIXME: The following limits should be reduced eventually.
10-
const ROOT_ENTRY_LIMIT: usize = 948;
10+
const ROOT_ENTRY_LIMIT: usize = 949;
1111
const ISSUES_ENTRY_LIMIT: usize = 2117;
1212

1313
fn check_entries(path: &Path, bad: &mut bool) {

0 commit comments

Comments
 (0)