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