about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-07-01 09:07:07 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-07-01 09:07:07 +0000
commit10787467bc268079951b997b8605dd51cc9047a2 (patch)
tree1ecafb4a4506324a561dda5d35ef43476bb76a7a /Src/builtin.c
parent486c21ad3a5530535f2c572c81b68548d628d675 (diff)
downloadzsh-10787467bc268079951b997b8605dd51cc9047a2.tar.gz
zsh-10787467bc268079951b997b8605dd51cc9047a2.tar.xz
zsh-10787467bc268079951b997b8605dd51cc9047a2.zip
27079: save lexical context in test builtin
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 60e81caa4..01e6b479b 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -5812,12 +5812,14 @@ bin_test(char *name, char **argv, UNUSED(Options ops), int func)
 	}
     }
 
+    lexsave();
     testargs = argv;
     tok = NULLTOK;
     condlex = testlex;
     testlex();
     prog = parse_cond();
     condlex = zshlex;
+    lexrestore();
 
     if (errflag) {
 	errflag = 0;