From 62b40c901dd15d2cb56ffca11ec18e2ff7873630 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 15 Nov 2026 16:40:30 +0100 Subject: [PATCH] tests: join: check -o fields after the file operands * tests/join/join.pl (o-after-files-1, o-after-files-2): New tests, ensuring a separate -o field is only taken while a file operand still follows it. https://github.com/uutils/coreutils/pull/16378 Link: https://github.com/coreutils/coreutils/pull/465 --- tests/join/join.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/join/join.pl b/tests/join/join.pl index 6d11cc659..3aaa78a5d 100755 --- a/tests/join/join.pl +++ b/tests/join/join.pl @@ -400,6 +400,13 @@ push @Tests, ['o-sep-space-enoent', '-o 1.1 1.2 2.2 f1', {EXIT=>1}, {ERR=>"$prog: 2.2: $limits->{ENOENT}\n"}]; +# A separate -o field is only taken while a file operand still follows. +push @Tests, + ['o-after-files-1', 'f1 f2 -o 1.1 1.2', {EXIT=>1}, + {ERR=>"$prog: extra operand '1.2'\n$try"}], + ['o-after-files-2', 'f1 f2 -o 1.1 2.2 1.2', {EXIT=>1}, + {ERR=>"$prog: extra operand '2.2'\n$try"}]; + if ($mb_locale ne 'C') { # Duplicate each test vector, appending "-mb" to the test name and