1# Check that -vv makes the line number of the failing RUN command clear. 2# (-v is actually sufficient in the case of the internal shell.) 3# 4# RUN: not %{lit} -j 1 -vv %{inputs}/shtest-run-at-line > %t.out 5# RUN: FileCheck --input-file %t.out %s 6# 7# END. 8 9 10# CHECK: Testing: 4 tests 11 12 13# In the case of the external shell, we check for only RUN lines in stderr in 14# case some shell implementations format "set -x" output differently. 15 16# CHECK-LABEL: FAIL: shtest-run-at-line :: external-shell/basic.txt 17 18# CHECK: Script: 19# CHECK: RUN: at line 4{{.*}} true 20# CHECK-NEXT: RUN: at line 5{{.*}} false 21# CHECK-NEXT: RUN: at line 6{{.*}} true 22 23# CHECK: RUN: at line 4 24# CHECK: RUN: at line 5 25# CHECK-NOT: RUN 26 27# CHECK-LABEL: FAIL: shtest-run-at-line :: external-shell/line-continuation.txt 28 29# CHECK: Script: 30# CHECK: RUN: at line 4{{.*}} echo 'foo bar' | FileCheck 31# CHECK-NEXT: RUN: at line 6{{.*}} echo 'foo baz' | FileCheck 32# CHECK-NEXT: RUN: at line 9{{.*}} echo 'foo bar' | FileCheck 33 34# CHECK: RUN: at line 4 35# CHECK: RUN: at line 6 36# CHECK-NOT: RUN 37 38 39# CHECK-LABEL: FAIL: shtest-run-at-line :: internal-shell/basic.txt 40 41# CHECK: Script: 42# CHECK: : 'RUN: at line 1'; true 43# CHECK-NEXT: : 'RUN: at line 2'; false 44# CHECK-NEXT: : 'RUN: at line 3'; true 45 46# CHECK: Command Output (stdout) 47# CHECK: $ ":" "RUN: at line 1" 48# CHECK-NEXT: $ "true" 49# CHECK-NEXT: $ ":" "RUN: at line 2" 50# CHECK-NEXT: $ "false" 51# CHECK-NOT: RUN 52 53# CHECK-LABEL: FAIL: shtest-run-at-line :: internal-shell/line-continuation.txt 54 55# CHECK: Script: 56# CHECK: : 'RUN: at line 1'; : first line continued to second line 57# CHECK-NEXT: : 'RUN: at line 3'; echo 'foo bar' | FileCheck 58# CHECK-NEXT: : 'RUN: at line 5'; echo 'foo baz' | FileCheck 59# CHECK-NEXT: : 'RUN: at line 8'; echo 'foo bar' | FileCheck 60 61# CHECK: Command Output (stdout) 62# CHECK: $ ":" "RUN: at line 1" 63# CHECK-NEXT: $ ":" "first" "line" "continued" "to" "second" "line" 64# CHECK-NEXT: $ ":" "RUN: at line 3" 65# CHECK-NEXT: $ "echo" "foo bar" 66# CHECK-NEXT: $ "FileCheck" "{{.*}}" 67# CHECK-NEXT: $ ":" "RUN: at line 5" 68# CHECK-NEXT: $ "echo" "foo baz" 69# CHECK-NEXT: $ "FileCheck" "{{.*}}" 70# CHECK-NOT: RUN 71