1; 2; Basic error checking. 3; 4 5this is something else 6 7; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-ERR1 2>&1 | FileCheck %s --check-prefix=ERRCOUNT1 8CHECK-ERR1-COUNT-xx: this 9ERRCOUNT1: [[@LINE-1]]:18: error: invalid count in -COUNT specification on prefix 'CHECK-ERR1' 10 11; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-ERR2 2>&1 | FileCheck %s --check-prefix=ERRCOUNT2 12CHECK-ERR2-COUNT-0x1: something 13ERRCOUNT2: [[@LINE-1]]:19: error: invalid count in -COUNT specification on prefix 'CHECK-ERR2' 14 15; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-ERR3 2>&1 | FileCheck %s --check-prefix=ERRCOUNT3 16CHECK-ERR3-COUNT-100x: else 17ERRCOUNT3: [[@LINE-1]]:21: error: invalid count in -COUNT specification on prefix 'CHECK-ERR3' 18 19; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-ERR4 2>&1 | FileCheck %s --check-prefix=ERRCOUNT4 20CHECK-ERR4-COUNT-0: else 21ERRCOUNT4: [[@LINE-1]]:19: error: invalid count in -COUNT specification on prefix 'CHECK-ERR4' 22 23; 24; Main functionality 25; 26 27this is duplicate 28this is duplicate 29this is not duplicate 30this is duplicate 31this is duplicate 32this is duplicate 33 34; RUN: FileCheck %s --input-file %s --check-prefix=CHECK-CNT1 35CHECK-CNT1-COUNT-1: this is duplicate 36CHECK-CNT1: this is duplicate 37CHECK-CNT1-NEXT: this is not duplicate 38 39; RUN: FileCheck %s --input-file %s --check-prefix=CHECK-CNT2 40CHECK-CNT2-COUNT-2: this is duplicate 41CHECK-CNT2: this is not duplicate 42 43; RUN: FileCheck %s --input-file %s --check-prefix=CHECK-CNT3 44CHECK-CNT3-COUNT-2: this is duplicate 45CHECK-CNT3: this is not duplicate 46CHECK-CNT3-COUNT-3: this is duplicate 47CHECK-CNT3-NOT: {{^}}this is duplicate 48 49; RUN: FileCheck %s --input-file %s --check-prefix=CHECK-CNT4 50CHECK-CNT4-COUNT-5: this is duplicate 51CHECK-CNT4-EMPTY: 52 53Many-label: 54 55-many- 56-many- 57-many- 58-many- 59-many- 60-many- 61-many- 62-many- 63-many- 64-many- 65-many- 66-many- 67-many- 68-many- 69-many- 70-many- 71 72; RUN: FileCheck %s --input-file %s --check-prefix=CHECK-CNTMANY 73CHECK-CNTMANY-COUNT-2: this is duplicate 74CHECK-CNTMANY-LABEL: Many-label: 75CHECK-CNTMANY-EMPTY: 76CHECK-CNTMANY-COUNT-16: {{^}}-many- 77CHECK-CNTMANY-EMPTY: 78 79; 80; Tests on mismatches: 81; 82 83; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-MIS1 2>&1 | FileCheck %s --check-prefix=MISCOUNT1 84CHECK-MIS1-COUNT-3: this is duplicate 85CHECK-MIS1: {{^}}this is not duplicate 86MISCOUNT1: [[@LINE-1]]:13: error: CHECK-MIS1: expected string not found in input 87 88; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-MIS2 2>&1 | FileCheck %s --check-prefix=MISCOUNT2 89CHECK-MIS2-COUNT-10: {{^this is duplicate}} 90CHECK-MIS2: {{^}}this is not duplicate 91MISCOUNT2: [[@LINE-2]]:22: error: CHECK-MIS2-COUNT: expected string not found in input 92 93; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK-MIS3 2>&1 | FileCheck %s --check-prefix=MISCOUNT3 94CHECK-MIS3-COUNT-5: this is duplicate 95CHECK-MIS3-EMPTY: 96CHECK-MIS3-LABEL: Many-label: 97CHECK-MIS3-EMPTY: 98CHECK-MIS3-COUNT-160: {{^}}-many- 99CHECK-MIS3-EMPTY: 100MISCOUNT3: [[@LINE-2]]:23: error: CHECK-MIS3-COUNT: expected string not found in input (17 out of 160) 101