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: not FileCheck --check-prefixes CHECK,LOCAL1 --enable-var-scope --input-file %s %s 2>&1 \
10 RUN: | FileCheck --check-prefixes ERRUNDEF,ERRUNDEFLOCAL %s
11 RUN: not FileCheck --check-prefixes CHECK,LOCAL2 --enable-var-scope --input-file %s %s 2>&1 \
12 RUN: | FileCheck --check-prefixes ERRUNDEF,ERRUNDEFLOCNUM %s
13 RUN: not FileCheck --check-prefixes CHECK,LOCAL3 --enable-var-scope --input-file %s %s 2>&1 \
14 RUN: | FileCheck --check-prefixes ERRUNDEF,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 ERRUNDEF: expected string not found in input
37 ERRUNDEFLOCAL: uses undefined variable(s): "LOCAL"
38 ERRUNDEFLOCNUM: uses undefined variable(s): "LOCNUM"