tre icon indicating copy to clipboard operation
tre copied to clipboard

Remove broken agrep test entry (fails with bash >= 5.2)

Open Vogtinator opened this issue 1 year ago • 0 comments

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.

Vogtinator avatar Oct 11 '22 09:10 Vogtinator