]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: sort: expand multiple output testing
authorPádraig Brady <P@draigBrady.com>
Wed, 28 May 2025 19:48:31 +0000 (20:48 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 28 May 2025 20:11:34 +0000 (21:11 +0100)
* tests/sort/sort.pl: Ensure duplicate
output strings are supported.

tests/sort/sort.pl

index 2ee92c45742a54bdc790c4cf5fd375190f09d4fc..5fa9d525273fbf25383b08983ac3d8aa5a1704ec 100755 (executable)
@@ -350,6 +350,11 @@ my @Tests =
 # Specifying two -o options should evoke a failure
 ["o2", qw(-o x -o y), {EXIT=>2},
  {ERR=>"foo\n"}, {ERR_SUBST => 's/^$prog: .*/foo/'}],
+# Specifying duplicate -o options should NOT evoke a failure
+["o3", qw(-o x -o x), {IN=>""}, {OUT=>""}],
+# Note we do simple string comparisons for this
+["o4", qw(-o x -o ./x), {EXIT=>2},
+ {ERR=>"foo\n"}, {ERR_SUBST => 's/^$prog: .*/foo/'}],
 
 # Specifying incompatible options should evoke a failure.
 ["incompat1", '-in', {EXIT=>2},