1 # Comment directives successfully comment out check directives.
3 # Check all default comment prefixes.
4 # Check that a comment directive at the beginning/end of the file is handled.
5 # Check that the preceding/following line's check directive is not affected.
6 RUN: echo 'foo' > %t-1.in
7 RUN: echo 'COM: CHECK: bar' > %t-1.chk
8 RUN: echo 'CHECK: foo' >> %t-1.chk
9 RUN: echo 'RUN: echo "CHECK: baz"' >> %t-1.chk
10 RUN: %ProtectFileCheckOutput FileCheck -dump-input=never -vv %t-1.chk < %t-1.in 2>&1 | \
11 RUN: FileCheck -DCHECK_LINE=2 %s
13 # Check the case of one user-specified comment prefix.
14 # Check that a comment directive not at the beginning of a line is handled.
15 RUN: echo 'foo' > %t-2.in
16 RUN: echo 'CHECK: foo' > %t-2.chk
17 RUN: echo 'letters then space MY-PREFIX: CHECK: bar' >> %t-2.chk
18 RUN: %ProtectFileCheckOutput \
19 RUN: FileCheck -dump-input=never -vv %t-2.chk -comment-prefixes=MY-PREFIX < %t-2.in 2>&1 | \
20 RUN: FileCheck -DCHECK_LINE=1 %s
22 # Check the case of multiple user-specified comment prefixes.
23 RUN: echo 'foo' > %t-3.in
24 RUN: echo 'Bar_2: CHECK: Bar' > %t-3.chk
25 RUN: echo 'CHECK: foo' >> %t-3.chk
26 RUN: echo 'Foo_1: CHECK: Foo' >> %t-3.chk
27 RUN: echo 'Baz_3: CHECK: Baz' >> %t-3.chk
28 RUN: %ProtectFileCheckOutput \
29 RUN: FileCheck -dump-input=never -vv %t-3.chk -comment-prefixes=Foo_1,Bar_2 \
30 RUN: -comment-prefixes=Baz_3 < %t-3.in 2>&1 | \
31 RUN: FileCheck -DCHECK_LINE=2 %s
33 CHECK: .chk:[[CHECK_LINE]]:8: remark: CHECK: expected string found in input