mirror of https://github.com/rust-lang/rust.git
Add some simple meta-tests for the handling of `filecheck` flags
This commit is contained in:
parent
397937d812
commit
36f298c93d
|
@ -0,0 +1,4 @@
|
|||
// Simple test that uses the default CHECK prefix and should always succeed.
|
||||
|
||||
// CHECK: main
|
||||
fn main() {}
|
|
@ -0,0 +1,7 @@
|
|||
// This is exactly like `msvc-prefix-good.rs`, except that it should always fail.
|
||||
|
||||
//@ should-fail
|
||||
|
||||
// MSVC: text that should not match
|
||||
// NONMSVC: text that should not match
|
||||
fn main() {}
|
|
@ -0,0 +1,7 @@
|
|||
// One of MSVC or NONMSVC should always be defined, so this test should pass.
|
||||
|
||||
// (one of these should always be present)
|
||||
|
||||
// MSVC: main
|
||||
// NONMSVC: main
|
||||
fn main() {}
|
|
@ -0,0 +1,5 @@
|
|||
// A test that doesn't include any filecheck directives should fail.
|
||||
|
||||
//@ should-fail
|
||||
|
||||
fn main() {}
|
|
@ -0,0 +1,8 @@
|
|||
// The current revision name is registered as a filecheck prefix.
|
||||
|
||||
//@ revisions: GOOD BAD
|
||||
//@ [BAD] should-fail
|
||||
|
||||
// GOOD: main
|
||||
// BAD: text that should not match
|
||||
fn main() {}
|
Loading…
Reference in New Issue