]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (getopt) remove unwanted paths from error output
authorKarel Zak <kzak@redhat.com>
Fri, 30 Aug 2019 18:35:55 +0000 (20:35 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 30 Aug 2019 18:46:44 +0000 (20:46 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/getopt/options-invalid_getopt_option.err
tests/expected/getopt/options-long_option_ambiguous_1.err
tests/expected/getopt/options-quiet_output_option_long.err
tests/expected/getopt/options-quiet_output_option_short.err
tests/expected/getopt/options-unknown_options.err
tests/ts/getopt/options

index 48ce3c597242f52524c8dc4b29068eef5a5efcdb..1eb882199a70b5c61e292ed00007355f40a61f5c 100644 (file)
@@ -1,2 +1,2 @@
-/home/projects/util-linux/util-linux/getopt: invalid option -- 'b'
+getopt: invalid option -- 'b'
 Try 'getopt --help' for more information.
index 7739c76990a035d1724291ca0fbe51f62d5e1666..1422799e806ce7b5badba6c98935ac63df767823 100644 (file)
@@ -1 +1 @@
-/home/projects/util-linux/util-linux/getopt: option '--long' is ambiguous; possibilities: '--long1' '--long2'
+getopt: option '--long' is ambiguous; possibilities: '--long1' '--long2'
index 58884308d47318de2f7223d49642f5182c8ea557..4fd8b0b73834cfeaf4fc0b35d6e374665f653841 100644 (file)
@@ -1,4 +1,4 @@
-/home/projects/util-linux/util-linux/getopt: invalid option -- 'c'
-/home/projects/util-linux/util-linux/getopt: unrecognized option '--unknown'
-/home/projects/util-linux/util-linux/getopt: option '--long' is ambiguous; possibilities: '--long1' '--long2'
-/home/projects/util-linux/util-linux/getopt: option requires an argument -- 'b'
+getopt: invalid option -- 'c'
+getopt: unrecognized option '--unknown'
+getopt: option '--long' is ambiguous; possibilities: '--long1' '--long2'
+getopt: option requires an argument -- 'b'
index 58884308d47318de2f7223d49642f5182c8ea557..4fd8b0b73834cfeaf4fc0b35d6e374665f653841 100644 (file)
@@ -1,4 +1,4 @@
-/home/projects/util-linux/util-linux/getopt: invalid option -- 'c'
-/home/projects/util-linux/util-linux/getopt: unrecognized option '--unknown'
-/home/projects/util-linux/util-linux/getopt: option '--long' is ambiguous; possibilities: '--long1' '--long2'
-/home/projects/util-linux/util-linux/getopt: option requires an argument -- 'b'
+getopt: invalid option -- 'c'
+getopt: unrecognized option '--unknown'
+getopt: option '--long' is ambiguous; possibilities: '--long1' '--long2'
+getopt: option requires an argument -- 'b'
index 1c0518bbd205ebb19373999831097ddefd920324..f8f67fb19eab181dd512fd0595006f334db5bb23 100644 (file)
@@ -1,2 +1,2 @@
-/home/projects/util-linux/util-linux/getopt: invalid option -- 'b'
-/home/projects/util-linux/util-linux/getopt: unrecognized option '--whatever'
+getopt: invalid option -- 'b'
+getopt: unrecognized option '--whatever'
index 7534d7a758e4c32e1a5549278a60d75f9429cf80..eedcbbc52a32935807b08c198646ce29e69c32d2 100755 (executable)
@@ -53,7 +53,7 @@ ts_finalize_subtest
 ts_init_subtest invalid_getopt_option
 $TS_CMD_GETOPT -b >> $TS_OUTPUT 2>> $TS_ERRLOG
 echo "exit value: $?" >> $TS_OUTPUT
-sed -i '1,1s/.*\///' $TS_OUTPUT
+sed -i '1,1s/.*\///' $TS_OUTPUT $TS_ERRLOG
 gnu_getopt_clean
 ts_finalize_subtest
 
@@ -84,8 +84,8 @@ ts_finalize_subtest
 ts_init_subtest long_option_ambiguous_1
 $TS_CMD_GETOPT -o a -l long1,long2 -- --long >> $TS_OUTPUT 2>> $TS_ERRLOG
 echo "exit value: $?" >> $TS_OUTPUT
-sed -i -e '1,1s/.*\///' -e "1s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
-sed -i -e "1s/is ambiguous: long$/'--long' is ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
+sed -i -e '1,1s/.*\///' -e "1s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
+sed -i -e "1s/is ambiguous: long$/'--long' is ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
 gnu_getopt_clean
 ts_finalize_subtest
 
@@ -122,16 +122,16 @@ ts_finalize_subtest
 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>> $TS_ERRLOG
 echo "exit value: $?" >> $TS_OUTPUT
-sed -i -e '1,4s/.*\///' -e "3s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
-sed -i -e "3s/is ambiguous: long$/'--long' is ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
+sed -i -e '1,4s/.*\///' -e "3s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
+sed -i -e "3s/is ambiguous: long$/'--long' is ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
 gnu_getopt_clean
 ts_finalize_subtest
 
 ts_init_subtest quiet_output_option_short
 $TS_CMD_GETOPT -Q -o a,b: -l long1,long2 -- -c --unknown --long -b >> $TS_OUTPUT 2>> $TS_ERRLOG
 echo "exit value: $?" >> $TS_OUTPUT
-sed -i -e '1,4s/.*\///' -e "3s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
-sed -i "3s/is ambiguous: long$/'--long' is ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
+sed -i -e '1,4s/.*\///' -e "3s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
+sed -i "3s/is ambiguous: long$/'--long' is ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT $TS_ERRLOG
 gnu_getopt_clean
 ts_finalize_subtest
 
@@ -150,7 +150,7 @@ ts_finalize_subtest
 ts_init_subtest unknown_options
 $TS_CMD_GETOPT -o a -l long -- -b --long --whatever -a >> $TS_OUTPUT 2>> $TS_ERRLOG
 echo "exit value: $?" >> $TS_OUTPUT
-sed -i '1,2s/.*\///' $TS_OUTPUT
+sed -i '1,2s/.*\///' $TS_OUTPUT $TS_ERRLOG
 gnu_getopt_clean
 ts_finalize_subtest
 
@@ -195,7 +195,7 @@ $TS_CMD_GETOPT >> $TS_OUTPUT 2>> $TS_ERRLOG
 echo "exit value: $?" >> $TS_OUTPUT
 GETOPT_COMPATIBLE='' $TS_CMD_GETOPT >> $TS_OUTPUT 2>> $TS_ERRLOG
 echo "exit value: $?" >> $TS_OUTPUT
-sed -i '1,1s/.*\///' $TS_OUTPUT
+sed -i '1,1s/.*\///' $TS_OUTPUT $TS_ERRLOG
 ts_finalize_subtest
 
 ts_init_subtest sh
@@ -211,7 +211,7 @@ ts_finalize_subtest
 ts_init_subtest no-arguments
 $TS_CMD_GETOPT >> $TS_OUTPUT 2>> $TS_ERRLOG
 echo "exit value: $?" >> $TS_OUTPUT
-sed -i '1,1s/.*\///' $TS_OUTPUT
+sed -i '1,1s/.*\///' $TS_OUTPUT $TS_ERRLOG
 ts_finalize_subtest
 
 ts_init_subtest posix_correctly