summaryrefslogtreecommitdiffstats
path: root/commands/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/test.c')
-rw-r--r--commands/test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/test.c b/commands/test.c
index c4f493860f..ab108fc845 100644
--- a/commands/test.c
+++ b/commands/test.c
@@ -208,6 +208,11 @@ static int do_test(int argc, char *argv[])
}
}
+ if (left < adv) {
+ printf("test: failed to parse arguments\n");
+ return 1;
+ }
+
if (last_cmp == 0)
expr = last_expr || expr;
else if (last_cmp == 1)