]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: fix getopt for old glibc
authorRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 24 Mar 2015 08:37:30 +0000 (09:37 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 29 Apr 2015 10:26:11 +0000 (12:26 +0200)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests/ts/misc/getopt2

index 14deb0d0ec9f715535b7dd0f830d3e127f2837da..677131f439950f9f115e3bc8f3e919248f90a274 100755 (executable)
@@ -74,7 +74,7 @@ echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest long_option_ambiguous_1
 $TS_CMD_GETOPT -o a -l long1,long2 -- --long >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
-sed -i '1,1s/.*\///' $TS_OUTPUT
+sed -i -e '1,1s/.*\///' -e "1s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
 ts_finalize_subtest
 
 echo "exit value: $?" >> $TS_OUTPUT
@@ -111,14 +111,14 @@ echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest quiet_output_option_long
 $TS_CMD_GETOPT --quiet-output -o a,b: -l long1,long2 -- -c --unknown --long -b >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
-sed -i '1,4s/.*\///' $TS_OUTPUT
+sed -i -e '1,4s/.*\///' -e "3s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
 ts_finalize_subtest
 
 echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest quiet_output_option_short
 $TS_CMD_GETOPT -Q -o a,b: -l long1,long2 -- -c --unknown --long -b >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
-sed -i '1,4s/.*\///' $TS_OUTPUT
+sed -i -e '1,4s/.*\///' -e "3s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
 ts_finalize_subtest
 
 echo "exit value: $?" >> $TS_OUTPUT