From: Cole Robinson Date: Fri, 17 Oct 2025 15:11:38 +0000 (-0400) Subject: tests: optstr: test redundant commas X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=468b97554107a9be2d43bdce9ee12862b1520e2f;p=thirdparty%2Futil-linux.git tests: optstr: test redundant commas optstr, used for parsing mount option lists, eats leading, trailing, and duplicated commas, but I can't find any test coverage for that behavior. Amend the existing optstr test to hit all the cases I can think of Signed-off-by: Cole Robinson --- diff --git a/tests/ts/misc/optstr b/tests/ts/misc/optstr index edc2f4cf1..9277a8f4b 100755 --- a/tests/ts/misc/optstr +++ b/tests/ts/misc/optstr @@ -8,7 +8,7 @@ ts_init "$*" ts_check_test_command "$TS_HELPER_STRUTILS" -$TS_HELPER_STRUTILS --optstr "key=\"v,a,l,u,e\",foo,bar=BAR,\"/path/with/,comma\"=data" >> $TS_OUTPUT 2>> $TS_ERRLOG +$TS_HELPER_STRUTILS --optstr ",,key=\"v,a,l,u,e\",foo,,,,bar=BAR,\"/path/with/,comma\"=data,," >> $TS_OUTPUT 2>> $TS_ERRLOG ts_finalize