[PATCH v2 0/4] add [ as alias for test, fix 0/1 argument handling
Rasmus Villemoes
ravi at prevas.dk
Thu Mar 12 11:01:02 CET 2026
Make 'test' behave a little more like its cousins in other shells, by
allowing the [ ... ] spelling, and while here, fix up the handling of
a single, non-empty argument to comply with POSIX.
v2: update documentation, add a few more test cases.
CI is happy: https://github.com/u-boot/u-boot/pull/905
v1: https://lore.kernel.org/u-boot/20260311120910.3934114-1-ravi@prevas.dk/
Rasmus Villemoes (4):
cmd: test: allow using [ as alias for test
doc: test: document [ ] spelling of test
test: add tests for left-bracket alias for 'test' command
cmd: test: fix handling of single-argument form of test
cmd/test.c | 30 +++++++++++++++--
doc/usage/cmd/test.rst | 5 ++-
test/hush/if.c | 73 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 105 insertions(+), 3 deletions(-)
--
2.53.0
More information about the U-Boot
mailing list