Skip to content

Commit 3869f1b

Browse files
author
klensy
committed
add tests for new behaviour
1 parent dac92f8 commit 3869f1b

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Defining check prefix name ending with directive are forbidden.
2+
3+
foo
4+
foo2
5+
6+
; FOO: foo
7+
; FOO-NEXT: foo2
8+
9+
; RUN: %ProtectFileCheckOutput not FileCheck -check-prefixes=FOO,FOO-NEXT -input-file %s %s 2>&1 | \
10+
; RUN: FileCheck -check-prefix=BAR %s
11+
12+
; BAR: supplied check prefix must not end with directive: '-NEXT', prefix: 'FOO-NEXT'
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Defining comment prefix name ending with directive are ok, but meaningless,
2+
# this line will be simply ignored.
3+
4+
foo
5+
foo2
6+
7+
; COMZ: FOO: foo
8+
; COMZ-NOT: FOO-NEXT: foo2
9+
10+
; RUN: %ProtectFileCheckOutput not FileCheck -check-prefix=FOO -comment-prefixes=COMZ -input-file %s %s 2>&1 | \
11+
; RUN: FileCheck -check-prefix=BAR %s
12+
13+
; BAR: error: found 'FOO-NEXT' without previous 'FOO: line

0 commit comments

Comments
 (0)