1 ; Test that variables not starting with dollar sign get undefined after a
2 ; CHECK-LABEL directive iff --enable-var-scope is used.
4 ; Reference run: variables remain defined at all time when not using
5 ; --enable-var-scope option.
6 RUN: FileCheck --check-prefixes CHECK,LOCAL3,GLOBAL --input-file %s %s
8 RUN: FileCheck --check-prefixes CHECK,GLOBAL --enable-var-scope --input-file %s %s
9 RUN: %ProtectFileCheckOutput not FileCheck --check-prefixes CHECK,LOCAL1 --enable-var-scope --input-file %s %s 2>&1 \
10 RUN: | FileCheck --check-prefix ERRUNDEFLOCAL %s
11 RUN: %ProtectFileCheckOutput not FileCheck --check-prefixes CHECK,LOCAL2 --enable-var-scope --input-file %s %s 2>&1 \
12 RUN: | FileCheck --check-prefix ERRUNDEFLOCNUM %s
13 RUN: %ProtectFileCheckOutput not FileCheck --check-prefixes CHECK,LOCAL3 --enable-var-scope --input-file %s %s 2>&1 \
14 RUN: | FileCheck --check-prefixes ERRUNDEFLOCAL,ERRUNDEFLOCNUM %s
18 CHECK: [[LOCAL:loc[^[:digit:]]*]][[#LOCNUM:]]
19 CHECK: [[$GLOBAL:glo[^[:digit:]]*]][[#$GLOBNUM:]]
23 CHECK: [[LOCAL]][[#LOCNUM+1]]
24 CHECK: [[$GLOBAL]][[#$GLOBNUM+1]]
32 LOCAL2: local[[#LOCNUM+2]]
33 LOCAL3: [[LOCAL]][[#LOCNUM+2]]
34 GLOBAL: [[$GLOBAL]][[#$GLOBNUM+2]]
36 ERRUNDEFLOCAL: undefined variable: LOCAL
37 ERRUNDEFLOCNUM: undefined variable: LOCNUM