brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · abef082 Raw
63 lines · plain
1; RUN: FileCheck -check-prefix=A -input-file %s %s2 3;; This tests the LITERAL directive modifier.4 5The result is "5371, 5372, 5373, 5374"6 7The result is "[[[5371]], [[5372]], [[5373]], [[5374]]]"8[[[5375]], [[5376]],9[[[5377]], [[5378]],10{{there you go.*}}11 12[[10]]13[[20]]14[[50]]15 16;; These should all not match.17; A{}: 5371, 5372,18; A{LITERAL} 5371, 5372,19; A{LITERAL 5371, 5372,20; A{LITERAL,} 5371, 5372,21; A{, LITERAL} 5371, 5372,22 23; A: 5371, 5372,24; A-SAME: 5373, 537425; A{LITERAL}: [[[5371]], [[5372]],26; A-SAME{LITERAL}: [[5373]], [[5374]]]27 28;; Modifier list allows whitespace.29; A{  LITERAL  }: [[[5375]], [[5376]],30;; Modifiers are combined into a set and repetition is allowed.31; A{LITERAL , LITERAL}: [[[5377]], [[5378]],32 33; A-NEXT{LITERAL}: {{there you go.*}}34; A-NOT{LITERAL}: [[50]]35; A-DAG{LITERAL}: [[20]]36; A-DAG{LITERAL}: [[10]]37; A{LITERAL}: [[50]]38 39; RUN: %ProtectFileCheckOutput \40; RUN: not FileCheck %s --input-file %s --check-prefix=INVALID 2>&1 | \41; RUN:   FileCheck %s --check-prefix=CHECK-INVALID42 43;; Ensure invalid modifier skipped.44 45; INVALID{BADMODIFIER}: 6371, 6372,46; CHECK-INVALID: no check strings found with prefix 'INVALID47 48; RUN: %ProtectFileCheckOutput \49; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-ERRNOT 2>&1 | \50; RUN:   FileCheck %s --check-prefix=ERRNOT51 52;; This ensures a failure is correctly reported when a NOT directive with a53;; LITERAL modifier matches.54 55[[a]]56[[b]]57[[c]]58 59; CHECK-ERRNOT{LITERAL}: [[a]]60; CHECK-ERRNOT-NOT{LITERAL}: [[b]]61; CHECK-ERRNOT{LITERAL}: [[c]]62; ERRNOT: no match expected63