34 lines · plain
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.in7RUN: echo 'COM: CHECK: bar' > %t-1.chk8RUN: echo 'CHECK: foo' >> %t-1.chk9RUN: echo 'RUN: echo "CHECK: baz"' >> %t-1.chk10RUN: %ProtectFileCheckOutput FileCheck -dump-input=never -vv %t-1.chk < %t-1.in 2>&1 | \11RUN: FileCheck -DCHECK_LINE=2 %s12 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.in16RUN: echo 'CHECK: foo' > %t-2.chk17RUN: echo 'letters then space MY-PREFIX: CHECK: bar' >> %t-2.chk18RUN: %ProtectFileCheckOutput \19RUN: FileCheck -dump-input=never -vv %t-2.chk -comment-prefixes=MY-PREFIX < %t-2.in 2>&1 | \20RUN: FileCheck -DCHECK_LINE=1 %s21 22# Check the case of multiple user-specified comment prefixes.23RUN: echo 'foo' > %t-3.in24RUN: echo 'Bar_2: CHECK: Bar' > %t-3.chk25RUN: echo 'CHECK: foo' >> %t-3.chk26RUN: echo 'Foo_1: CHECK: Foo' >> %t-3.chk27RUN: echo 'Baz_3: CHECK: Baz' >> %t-3.chk28RUN: %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 %s32 33CHECK: .chk:[[CHECK_LINE]]:8: remark: CHECK: expected string found in input34