83 lines · plain
1; RUN: FileCheck -input-file %s %s2; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix BAD1 -input-file %s %s 2>&1 | FileCheck -check-prefix ERR1 %s3; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix BAD2 -input-file %s %s 2>&1 | FileCheck -check-prefix ERR2 %s4; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix BAD3 -input-file %s %s 2>&1 | FileCheck -check-prefix ERR3 %s5; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix BAD4 -input-file %s %s 2>&1 | FileCheck -check-prefix ERR4 %s6; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix BAD5 -input-file %s %s 2>&1 | FileCheck -check-prefix ERR5 %s7; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix BAD6 -input-file %s %s 2>&1 | FileCheck -check-prefix ERR6 %s8; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix BAD7 -input-file %s %s 2>&1 | FileCheck -check-prefix ERR7 %s9; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix BAD8 -input-file %s %s 2>&1 | FileCheck -check-prefix ERR8 %s10; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix BAD9 -input-file %s %s 2>&1 | FileCheck -check-prefix ERR9 %s11; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix BAD10 -input-file %s %s 2>&1 | FileCheck -check-prefix ERR10 %s12; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix BAD11 -input-file %s %s 2>&1 | FileCheck -check-prefix ERR11 %s13131414 aaa1515 bbb1616 ccc1717 CHECK: [[@LINE-3]] {{a}}aa1818 CHECK: [[@LINE-3]] {{b}}bb1919 CHECK: [[@LINE-3]] {{c}}cc2020 foobar2121 CHECK: [[@LINE-1]] {{foo}}bar22222323 arst CHECK: [[@LINE]] {{a}}rst24242525 BAD1: [[@LINE:cant-have-regex]]2626 ERR1: line-count.txt:[[#@LINE-1]]:12: error: invalid name in string variable definition27272828 BAD2: [[ @LINE]]2929 ERR2: line-count.txt:[[#@LINE-1]]:12: error: unexpected whitespace30303131 BAD3: [[@LINE ]]3232 ERR3: line-count.txt:[[#@LINE-1]]:17: error: unexpected whitespace33333434 BAD4: [[ @LINE-1]]3535 ERR4: line-count.txt:[[#@LINE-1]]:12: error: unexpected whitespace36363737 BAD5: [[@LINE -1]]3838 ERR5: line-count.txt:[[#@LINE-1]]:17: error: unexpected whitespace39394040 BAD6: [[@LINE- 1]]4141 ERR6: line-count.txt:[[#@LINE-1]]:18: error: unexpected whitespace42424343 BAD7: [[@LINE-1 ]]4444 ERR7: line-count.txt:[[#@LINE-1]]:19: error: unexpected whitespace45454646 BAD8: [[@LIN]]4747 ERR8: line-count.txt:[[#@LINE-1]]:12: error: invalid pseudo numeric variable '@LIN'48484949 BAD9: [[@LINE*2]]5050 ERR9: line-count.txt:[[#@LINE-1]]:17: error: unsupported operation '*'51515252 BAD10: [[@LINE-x]]5353 ERR10: line-count.txt:[[#@LINE-1]]:19: error: invalid operand format5454 ERR10-NEXT: 52 {{B}}AD10: {{\[\[@LINE-x\]\]}}5555 ERR10-NEXT: {{^}} ^{{$}}56565757 BAD11: [[@LINE-1x]]5858 ERR11: line-count.txt:[[#@LINE-1]]:20: error: unexpected characters at end of expression 'x'595960; RUN: %ProtectFileCheckOutput \61; RUN: not FileCheck -check-prefix BAD12 -input-file %s %s 2>&1 \62; RUN: | FileCheck -check-prefix ERR12 %s63636464 BAD12: [[#@LINE-1]] NOT HERE6565 ERR12: note: with "@LINE-1" equal to "63"666667; RUN: %ProtectFileCheckOutput \68; RUN: not FileCheck --check-prefix BAD13 --input-file %s %s 2>&1 \69; RUN: | FileCheck --check-prefix ERR13 %s70707171 BAD13: [[@LINE-0xA]]7272 ERR13: line-count.txt:[[#@LINE-1]]:20: error: unexpected characters at end of expression 'xA'73737474 CHECK: [[#@LINE]] CHECK7575 CHECK: [[# @LINE]] CHECK7676 CHECK: [[# @LINE ]] CHECK77777878 CHECK: [[#@LINE-1]]7979 CHECK: [[# @LINE-1]] CHECK8080 CHECK: [[# @LINE -1]] CHECK8181 CHECK: [[# @LINE - 1]] CHECK8282 CHECK: [[# @LINE - 1 ]] CHECK83