commands/test: Improve option parsing to handle "]" less special
Testing for *ap[1] != ']' is bogus during option processing. Instead
test if there are options left to be processed.

This fixes the return value for e.g.

	test -z ']lala'

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 6e7f99f commit 7b95857a7ad911e698dc18261deceffdfd7d9fdb
@Uwe Kleine-König Uwe Kleine-König authored on 28 Jan 2020
Sascha Hauer committed on 10 Feb 2020
Showing 1 changed file
View
commands/test.c