57 lines · plain
1; basic functionality2; RUN: FileCheck %s --input-file %s --check-prefix=CHECK13foo4 5bar6CHECK1: foo7CHECK1-EMPTY:8CHECK1-NEXT: bar9 10; next line must be blank11; RUN: %ProtectFileCheckOutput \12; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK2A 2>&1 \13; RUN: | FileCheck %s --check-prefix=CHECK2B14badger15CHECK2A: badger16CHECK2A-EMPTY:17CHECK2B: CHECK2A-EMPTY: is not on the line after the previous match18 19; CHECK-EMPTY must have empty pattern20; RUN: %ProtectFileCheckOutput \21; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK3A 2>&1 \22; RUN: | FileCheck %s --check-prefix=CHECK3B23CHECK3A: foo24CHECK3A-EMPTY: this is not empty25CHECK3B: found non-empty check string for empty check with prefix 'CHECK3A:'26 27; CHECK-EMPTY cannot be the first check28; RUN: %ProtectFileCheckOutput \29; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK4A 2>&1 \30; RUN: | FileCheck %s --check-prefix=CHECK4B31CHECK4A-EMPTY:32CHECK4B: found 'CHECK4A-EMPTY' without previous 'CHECK4A: line33 34; CHECK-EMPTY-NOT and CHECK-NOT-EMPTY rejected35; RUN: %ProtectFileCheckOutput \36; RUN: not FileCheck %s --input-file %s --check-prefixes=CHECK5A 2>&1 \37; RUN: | FileCheck %s --check-prefix=CHECK5C38; RUN: %ProtectFileCheckOutput \39; RUN: not FileCheck %s --input-file %s --check-prefixes=CHECK5B 2>&1 \40; RUN: | FileCheck %s --check-prefix=CHECK5C41CHECK5A-EMPTY-NOT:42CHECK5B-NOT-EMPTY:43CHECK5C: unsupported -NOT combo on prefix 'CHECK5{{A|B}}'44 45; whitespace does not count as empty46; RUN: %ProtectFileCheckOutput \47; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK6A --match-full-lines \48; RUN: 2>&1 | FileCheck %s --check-prefix=CHECK6B49CHECK6A: the next line has spaces50CHECK6A-EMPTY:51CHECK6B: expected string not found in input52 53; ***don't add any further blank lines after this point***54; CHECK-EMPTY, like CHECK-NEXT, will report an error if the first matching55; line is not the line immediately following the previous check.56the next line has spaces57