1# Comment directives successfully comment out check directives.
2
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.
6RUN: echo 'foo'                    >  %t-1.in
7RUN: echo 'COM: CHECK: bar'        >  %t-1.chk
8RUN: echo 'CHECK: foo'             >> %t-1.chk
9RUN: echo 'RUN: echo "CHECK: baz"' >> %t-1.chk
10RUN: %ProtectFileCheckOutput FileCheck -dump-input=never -vv %t-1.chk < %t-1.in 2>&1 | \
11RUN:   FileCheck -DCHECK_LINE=2 %s
12
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.
15RUN: echo 'foo'                                      >  %t-2.in
16RUN: echo 'CHECK: foo'                               >  %t-2.chk
17RUN: echo 'letters then space MY-PREFIX: CHECK: bar' >> %t-2.chk
18RUN: %ProtectFileCheckOutput \
19RUN: FileCheck -dump-input=never -vv %t-2.chk -comment-prefixes=MY-PREFIX < %t-2.in 2>&1 | \
20RUN:   FileCheck -DCHECK_LINE=1 %s
21
22# Check the case of multiple user-specified comment prefixes.
23RUN: echo 'foo'               >  %t-3.in
24RUN: echo 'Bar_2: CHECK: Bar' >  %t-3.chk
25RUN: echo 'CHECK: foo'        >> %t-3.chk
26RUN: echo 'Foo_1: CHECK: Foo' >> %t-3.chk
27RUN: echo 'Baz_3: CHECK: Baz' >> %t-3.chk
28RUN: %ProtectFileCheckOutput \
29RUN: FileCheck -dump-input=never -vv %t-3.chk -comment-prefixes=Foo_1,Bar_2 \
30RUN:           -comment-prefixes=Baz_3 < %t-3.in 2>&1 | \
31RUN:   FileCheck -DCHECK_LINE=2 %s
32
33CHECK: .chk:[[CHECK_LINE]]:8: remark: CHECK: expected string found in input
34