57 lines · plain
1; RUN: sed 's#^;.*##' %s | FileCheck -check-prefix=CHECK-PASS -implicit-check-not=warning: %s2 3; Check we report an error when an unknown prefix is used together with `-implicit-check-not`.4; RUN: sed 's#^;.*##' %s | %ProtectFileCheckOutput not FileCheck -check-prefix=UNKNOWN-PREFIX -implicit-check-not=abc %s 2>&1 | FileCheck %s -DPREFIX=UNKNOWN-PREFIX -check-prefix CHECK-PREFIX-ERROR5; CHECK-PREFIX-ERROR: error: no check strings found with prefix '[[PREFIX]]:'6 7; Check we report an error when the "CHECK" prefix is used explicitly with `-implicit-check-not`, but not present in the input.8; RUN: sed 's#^;.*##' %s | %ProtectFileCheckOutput not FileCheck -check-prefix=CHECK -implicit-check-not=abc %s 2>&1 | FileCheck %s -DPREFIX=CHECK -check-prefix CHECK-PREFIX-ERROR9 10; Check we allow using `-implicit-check-not` when there is no `-check-prefix` specified and there11; is no default `CHECK` line in an input.12; RUN: sed 's#^;.*##' %s | FileCheck -implicit-check-not="unique_string" %s13 14; RUN: sed 's#^;.*##' %s | %ProtectFileCheckOutput not FileCheck -check-prefix=CHECK-FAIL1 -implicit-check-not=warning: %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR115; RUN: sed 's#^;.*##' %s | %ProtectFileCheckOutput not FileCheck -check-prefix=CHECK-FAIL2 -implicit-check-not=warning: %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR216; RUN: sed 's#^;.*##' %s | %ProtectFileCheckOutput not FileCheck -check-prefix=CHECK-FAIL3 -implicit-check-not=warning: %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR317; RUN: sed 's#^;.*##' %s | %ProtectFileCheckOutput not FileCheck -check-prefix=CHECK-FAIL1 -implicit-check-not='{{aaa|bbb|ccc}}' %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR418; RUN: sed 's#^;.*##' %s | %ProtectFileCheckOutput not FileCheck -check-prefix=CHECK-FAIL1 -implicit-check-not=aaa -implicit-check-not=bbb -implicit-check-not=ccc %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR519; RUN: sed 's#^;.*##' %s | %ProtectFileCheckOutput not FileCheck -check-prefix=CHECK-FAIL2 -implicit-check-not=aaa -implicit-check-not=bbb -implicit-check-not=ccc %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR620; RUN: sed 's#^;.*##' %s | %ProtectFileCheckOutput not FileCheck -check-prefix=CHECK-FAIL3 -implicit-check-not=aaa -implicit-check-not=bbb -implicit-check-not=ccc %s 2>&1 | FileCheck %s -check-prefix CHECK-ERROR721 22warning: aaa23; CHECK-PASS: warning: aaa24; CHECK-ERROR1: command line:1:22: error: IMPLICIT-CHECK-NOT: excluded string found in input25; CHECK-ERROR1-NEXT: -implicit-check-not='warning:'26; CHECK-ERROR1: note: found here27; CHECK-FAIL2: warning: aaa28; CHECK-FAIL3: warning: aaa29; CHECK-ERROR4: command line:1:22: error: IMPLICIT-CHECK-NOT: excluded string found in input30; CHECK-ERROR4-NEXT: {{-implicit-check-not='\{\{aaa\|bbb\|ccc\}\}'}}31; CHECK-ERROR4: note: found here32; CHECK-ERROR5: command line:1:22: error: IMPLICIT-CHECK-NOT: excluded string found in input33; CHECK-ERROR5-NEXT: -implicit-check-not='aaa'34; CHECK-ERROR5: note: found here35 36warning: bbb37; CHECK-PASS: warning: bbb38; CHECK-FAIL1: warning: bbb39; CHECK-ERROR2: command line:1:22: error: IMPLICIT-CHECK-NOT: excluded string found in input40; CHECK-ERROR2-NEXT: -implicit-check-not='warning:'41; CHECK-ERROR2: note: found here42; CHECK-FAIL3: warning: bbb43; CHECK-ERROR6: command line:1:22: error: IMPLICIT-CHECK-NOT: excluded string found in input44; CHECK-ERROR6-NEXT: -implicit-check-not='bbb'45; CHECK-ERROR6: note: found here46 47warning: ccc48; CHECK-PASS: warning: ccc49; CHECK-FAIL1: warning: ccc50; CHECK-FAIL2: warning: ccc51; CHECK-ERROR3: command line:1:22: error: IMPLICIT-CHECK-NOT: excluded string found in input52; CHECK-ERROR3-NEXT: -implicit-check-not='warning:'53; CHECK-ERROR3: note: found here54; CHECK-ERROR7: command line:1:22: error: IMPLICIT-CHECK-NOT: excluded string found in input55; CHECK-ERROR7-NEXT: -implicit-check-not='ccc'56; CHECK-ERROR7: note: found here57