tests: sort: expand multiple output testing

* tests/sort/sort.pl: Ensure duplicate
output strings are supported.
This commit is contained in:
Pádraig Brady
2025-05-28 20:48:31 +01:00
parent c8d75786b2
commit 21a662b1ee

View File

@@ -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},