about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-09-02 15:26:44 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-09-02 15:26:44 +0000
commit6d4d1261a5c813033f01e90c708c0dcfbc7e1b6e (patch)
treefe7d9829f4e52c617e754b3611706b5cfc46cd90 /Src/builtin.c
parent5b80d50ad3b88b74ff84ae760d80d7a965ea5670 (diff)
downloadzsh-6d4d1261a5c813033f01e90c708c0dcfbc7e1b6e.tar.gz
zsh-6d4d1261a5c813033f01e90c708c0dcfbc7e1b6e.tar.xz
zsh-6d4d1261a5c813033f01e90c708c0dcfbc7e1b6e.zip
27240: fix fix for lexing in test builtin
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 2d5489c21..f032230b6 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -5818,17 +5818,19 @@ bin_test(char *name, char **argv, UNUSED(Options ops), int func)
     testlex();
     prog = parse_cond();
     condlex = zshlex;
-    lexrestore();
 
     if (errflag) {
 	errflag = 0;
+	lexrestore();
 	return 1;
     }
 
     if (!prog || tok == LEXERR) {
 	zwarnnam(name, tokstr ? "parse error" : "argument expected");
+	lexrestore();
 	return 1;
     }
+    lexrestore();
 
     if (*curtestarg) {
 	zwarnnam(name, "too many arguments");