xref: /llvm-project/llvm/test/FileCheck/check-empty.txt (revision 6e01cd6795f83c09639604871cf52f5b124c1858)
1// RUN: %ProtectFileCheckOutput \
2// RUN: not FileCheck -check-prefix=FOO %s </dev/null 2>&1 \
3// RUN: | FileCheck -check-prefix=EMPTY-ERR %s
4//
5// RUN: %ProtectFileCheckOutput \
6// RUN: not FileCheck -check-prefix=NOFOO %s </dev/null 2>&1 \
7// RUN: | FileCheck -check-prefix=EMPTY-ERR %s
8//
9// RUN: %ProtectFileCheckOutput \
10// RUN: not FileCheck -check-prefix=FOO -allow-empty %s </dev/null 2>&1 \
11// RUN: | FileCheck -check-prefix=NO-EMPTY-ERR -check-prefix=NOT-FOUND %s
12//
13// RUN: %ProtectFileCheckOutput \
14// RUN: FileCheck -check-prefix=NOFOO -allow-empty %s </dev/null 2>&1 \
15// RUN: | FileCheck -allow-empty -check-prefix=NO-EMPTY-ERR %s
16
17; FOO: foo
18; NOFOO-NOT: foo
19
20; EMPTY-ERR: FileCheck error: '<stdin>' is empty.
21; EMPTY-ERR-NEXT: FileCheck command line: {{.*}}{{F|f}}ile{{C|c}}heck{{.*}}-check-prefix={{.*}}FOO {{.*}}check-empty.txt
22; NO-EMPTY-ERR-NOT: FileCheck error: '<stdin>' is empty.
23; NOT-FOUND: error: FOO: expected string not found in input
24