From 05d237cc5673e83c5a87a38349fef3961a6cac6a Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 21 Jun 2026 19:11:51 -0700 Subject: [PATCH] tests: sort: check that invalid --parallel arguments are diagnosed * tests/sort/sort.pl (@Tests): Add a few test cases. --- tests/sort/sort.pl | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.47.3