cmd_test: evaluate to false without any arguments
authorStephen Warren <swarren@nvidia.com>
Mon, 3 Feb 2014 20:21:05 +0000 (13:21 -0700)
committerjino.cho <jino.cho@samsung.com>
Tue, 28 Feb 2017 10:12:15 +0000 (19:12 +0900)
commit34c687e6fac3f9d47bc44c8e390e73c18e1c7ad0
tree0d231b3cee62df11f417ed5796cf2614383b1dd4
parent28eac7098e6f6c4268d45830dd02908df759efa6
cmd_test: evaluate to false without any arguments

This emulates bash:
$ if test; then echo yes; else echo no; fi
no

Currently, the code sets expr = -1 in this case, which gets mapped to
0 (true) at the end of do_test() by the logical -> shell exit code
conversion.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
common/cmd_test.c