hush: make run_command() return an error on parsing failure
run_command() returns success even if the command had a syntax error;
correct this behaviour.
Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Simon Glass <sjg@chromium.org)
diff --git a/test/command_ut.c b/test/command_ut.c
index a4f0341..926573a 100644
--- a/test/command_ut.c
+++ b/test/command_ut.c
@@ -191,6 +191,8 @@
assert(run_command("", 0) == 0);
assert(run_command(" ", 0) == 0);
+ assert(run_command("'", 0) == 1);
+
printf("%s: Everything went swimmingly\n", __func__);
return 0;
}