Skip to content

Commit d976ed0

Browse files
committed
Add some simple meta-tests for the handling of filecheck flags
1 parent bccb9bb commit d976ed0

File tree

5 files changed

+28
-0
lines changed

5 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Simple test that uses the default CHECK prefix and should always succeed.
2+
3+
// CHECK: main
4+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// This is exactly like `msvc-prefix-good.rs`, except that it should always fail.
2+
3+
// should-fail
4+
// MSVC: text that should not match
5+
// NONMSVC: text that should not match
6+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// One of MSVC or NONMSVC should always be defined, so this test should pass.
2+
3+
// (one of these should always be present)
4+
// MSVC: main
5+
// NONMSVC: main
6+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// A test that doesn't include any filecheck directives should fail.
2+
3+
// should-fail
4+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// The current revision name is registered as a filecheck prefix.
2+
3+
// revisions: GOOD BAD
4+
// [BAD] should-fail
5+
6+
// GOOD: main
7+
// BAD: text that should not match
8+
fn main() {}

0 commit comments

Comments
 (0)