From: Collin Funk Date: Mon, 22 Jun 2026 02:11:51 +0000 (-0700) Subject: tests: sort: check that invalid --parallel arguments are diagnosed X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;ds=sidebyside;p=thirdparty%2Fcoreutils.git tests: sort: check that invalid --parallel arguments are diagnosed * tests/sort/sort.pl (@Tests): Add a few test cases. --- diff --git a/tests/sort/sort.pl b/tests/sort/sort.pl index e37a746ec2..737f7a21cc 100755 --- a/tests/sort/sort.pl +++ b/tests/sort/sort.pl @@ -415,6 +415,12 @@ my @Tests = ['zero-1', '-z', {IN=>"2\0001\000"}, {OUT=>"1\0002\000"}], ['zero-2', '-z -k2,2', {IN=>"1\n2\0002\n1\000"}, {OUT=>"2\n1\0001\n2\000"}], ['zero-3', '-zb -k2,2', {IN=>"1\n\n2\0002\n1\0"}, {OUT=>"2\n1\0001\n\n2\0"}], + +# Invalid --parallel arguments. +['invalid-parallel-1', '--parallel -1', {IN=>""}, {EXIT=>2}, + {ERR=>"$prog: invalid --parallel argument '-1'\n"}], +['invalid-parallel-2', '--parallel a', {IN=>""}, {EXIT=>2}, + {ERR=>"$prog: invalid --parallel argument 'a'\n"}], ); # Add _POSIX2_VERSION=199209 to the environment of each test