From 35f61f40d6b68928ca5d409fa9fc204ea77e2199 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 11 Oct 2022 11:35:53 +0200 Subject: [PATCH] Remove broken agrep test entry It's meant to cause agrep to return with exit code 2, but asserts that it's exit code 1 instead. It's meant to ensure that using ".*" as pattern results in exit code 2 because it matches also an empty string. However, glob expansion results in ".*" picking up files such as "." and ".." from the CWD, which get interpreted as valid pattern. This results in exit status 1 (no match found) which is what the .ok file expects, but that's invalid. With bash 5.2, glob expansion no longer matches "." and ".." by default, so the test works as intended by accident, causing a mismatch with the expected wrong exit code. It's unfortunately not easily possible to avoid glob expansion in this case. Just remove the test for now. --- tests/agrep/exitstatus.args | 1 - tests/agrep/exitstatus.ok | 61 ------------------------------------- 2 files changed, 62 deletions(-) diff --git a/tests/agrep/exitstatus.args b/tests/agrep/exitstatus.args index 808ae77..2f53e97 100644 --- a/tests/agrep/exitstatus.args +++ b/tests/agrep/exitstatus.args @@ -5,6 +5,5 @@ this-wont-be-found . -v . # Some errors which should give exit status 2. --d .* dummy -d {1 dummy \ diff --git a/tests/agrep/exitstatus.ok b/tests/agrep/exitstatus.ok index 28427bb..bd23b4c 100644 --- a/tests/agrep/exitstatus.ok +++ b/tests/agrep/exitstatus.ok @@ -521,67 +521,6 @@ Exit status 1. Exit status 1. #### TEST: agrep -H -n -s --color --show-position -v . < exitstatus.in -Exit status 1. -#### TEST: agrep -d .* dummy exitstatus.in - -Exit status 1. -#### TEST: agrep -d .* dummy < exitstatus.in - -Exit status 1. -#### TEST: agrep -c -d .* dummy exitstatus.in -exitstatus.in:0 - -Exit status 1. -#### TEST: agrep -c -d .* dummy < exitstatus.in - -Exit status 1. -#### TEST: agrep -H -d .* dummy exitstatus.in - -Exit status 1. -#### TEST: agrep -H -d .* dummy < exitstatus.in - -Exit status 1. -#### TEST: agrep -l -d .* dummy exitstatus.in - -Exit status 1. -#### TEST: agrep -l -d .* dummy < exitstatus.in - -Exit status 1. -#### TEST: agrep -n -d .* dummy exitstatus.in - -Exit status 1. -#### TEST: agrep -n -d .* dummy < exitstatus.in - -Exit status 1. -#### TEST: agrep -s -d .* dummy exitstatus.in - -Exit status 1. -#### TEST: agrep -s -d .* dummy < exitstatus.in - -Exit status 1. -#### TEST: agrep -M -d .* dummy exitstatus.in - -Exit status 1. -#### TEST: agrep -M -d .* dummy < exitstatus.in - -Exit status 1. -#### TEST: agrep --show-position -d .* dummy exitstatus.in - -Exit status 1. -#### TEST: agrep --show-position -d .* dummy < exitstatus.in - -Exit status 1. -#### TEST: agrep --color -d .* dummy exitstatus.in - -Exit status 1. -#### TEST: agrep --color -d .* dummy < exitstatus.in - -Exit status 1. -#### TEST: agrep -H -n -s --color --show-position -d .* dummy exitstatus.in - -Exit status 1. -#### TEST: agrep -H -n -s --color --show-position -d .* dummy < exitstatus.in - Exit status 1. #### TEST: agrep -d {1 dummy exitstatus.in -- 2.36.1