2 ; Basic error checking.
7 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-ERR1 2>&1 | FileCheck %s --check-prefix=ERRCOUNT1
8 CHECK-ERR1-COUNT-xx: this
9 ERRCOUNT1: [[@LINE-1]]:18: error: invalid count in -COUNT specification on prefix 'CHECK-ERR1'
11 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-ERR2 2>&1 | FileCheck %s --check-prefix=ERRCOUNT2
12 CHECK-ERR2-COUNT-0x1: something
13 ERRCOUNT2: [[@LINE-1]]:19: error: invalid count in -COUNT specification on prefix 'CHECK-ERR2'
15 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-ERR3 2>&1 | FileCheck %s --check-prefix=ERRCOUNT3
16 CHECK-ERR3-COUNT-100x: else
17 ERRCOUNT3: [[@LINE-1]]:21: error: invalid count in -COUNT specification on prefix 'CHECK-ERR3'
19 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-ERR4 2>&1 | FileCheck %s --check-prefix=ERRCOUNT4
20 CHECK-ERR4-COUNT-0: else
21 ERRCOUNT4: [[@LINE-1]]:19: error: invalid count in -COUNT specification on prefix 'CHECK-ERR4'
34 ; RUN: FileCheck %s --input-file %s --check-prefix=CHECK-CNT1
35 CHECK-CNT1-COUNT-1: this is duplicate
36 CHECK-CNT1: this is duplicate
37 CHECK-CNT1-NEXT: this is not duplicate
39 ; RUN: FileCheck %s --input-file %s --check-prefix=CHECK-CNT2
40 CHECK-CNT2-COUNT-2: this is duplicate
41 CHECK-CNT2: this is not duplicate
43 ; RUN: FileCheck %s --input-file %s --check-prefix=CHECK-CNT3
44 CHECK-CNT3-COUNT-2: this is duplicate
45 CHECK-CNT3: this is not duplicate
46 CHECK-CNT3-COUNT-3: this is duplicate
47 CHECK-CNT3-NOT: {{^}}this is duplicate
49 ; RUN: FileCheck %s --input-file %s --check-prefix=CHECK-CNT4
50 CHECK-CNT4-COUNT-5: this is duplicate
72 ; RUN: FileCheck %s --input-file %s --check-prefix=CHECK-CNTMANY
73 CHECK-CNTMANY-COUNT-2: this is duplicate
74 CHECK-CNTMANY-LABEL: Many-label:
76 CHECK-CNTMANY-COUNT-16: {{^}}-many-
80 ; Tests on mismatches:
83 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-MIS1 2>&1 | FileCheck %s --check-prefix=MISCOUNT1
84 CHECK-MIS1-COUNT-3: this is duplicate
85 CHECK-MIS1: {{^}}this is not duplicate
86 MISCOUNT1: [[@LINE-1]]:13: error: CHECK-MIS1: expected string not found in input
88 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-MIS2 2>&1 | FileCheck %s --check-prefix=MISCOUNT2
89 CHECK-MIS2-COUNT-10: {{^this is duplicate}}
90 CHECK-MIS2: {{^}}this is not duplicate
91 MISCOUNT2: [[@LINE-2]]:22: error: CHECK-MIS2-COUNT: expected string not found in input
93 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-MIS3 2>&1 | FileCheck %s --check-prefix=MISCOUNT3
94 CHECK-MIS3-COUNT-5: this is duplicate
96 CHECK-MIS3-LABEL: Many-label:
98 CHECK-MIS3-COUNT-160: {{^}}-many-
100 MISCOUNT3: [[@LINE-2]]:23: error: CHECK-MIS3-COUNT: expected string not found in input (17 out of 160)