FileCheck.py icon indicating copy to clipboard operation
FileCheck.py copied to clipboard

Something is wrong with the greediness in one example

Open stanislaw opened this issue 5 years ago • 1 comments

See 10-edge-case-llvm-vs-py-ghost-newline-in-llvm:

; RUN: echo -e "String1" | (%FILECHECK_EXEC %S/CHECK.check 2>&1; test $? = 1;) | %FILECHECK_EXEC %s --strict-whitespace --match-full-lines
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
// TODO: Something wrong with the greediness here:
; CHECK***:{{^.*}}CHECK.check:2:8: error: CHECK***: expected string not found in input
; CHECK:{{^.*}}
// TODO: And here:
; CHECK:{{.*}}String2
; CHECK:       ^
; CHECK:<stdin>:1:8: note: scanning from here
; CHECK:String1
; CHECK:       ^
; CHECK-EMPTY:

stanislaw avatar Jan 26 '20 11:01 stanislaw

Also this:

; RUN: printf "String1" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK.check" | %FILECHECK_EXEC "%s" --strict-whitespace --match-full-lines

// TODO: Something wrong with the greediness here:
; CHECK:{{^.*}}CHECK.check:2:8: error: {{CHECK}}: expected string not found in input
// TODO: And here:
; CHECK:{{^CHECK}}: String2
; CHECK:       ^
; CHECK:<stdin>:1:8: note: scanning from here
; CHECK:String1
; CHECK:       ^
; CHECK-EMPTY:

stanislaw avatar Apr 23 '20 21:04 stanislaw