]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: improve ERE in sc_tests_list_consistency
authorBernhard Voelker <mail@bernhard-voelker.de>
Sat, 1 Jun 2024 14:00:30 +0000 (16:00 +0200)
committerBernhard Voelker <mail@bernhard-voelker.de>
Sat, 1 Jun 2024 14:59:07 +0000 (16:59 +0200)
The ERE used lacks the grouping of the extensions and therefore would
also match files where the first two patterns are not at the end of
the line:
  grep -E '\.sh|\.pl|\.xpl$'

* cfg.mk (sc_tests_list_consistency): Add grouping (...) around the
sub-patterns.  While at it, also remove the redundant escaping, i.e.,
\$$ -> $$ to be consistent with the rest of this file.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index 2cfb31877f3fbc94300bb10e228d2caed0671842..647b6600edcd9803fefa9190d0c10e5f95c63f56 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -121,7 +121,7 @@ sc_tests_list_consistency:
          cd $(top_srcdir);                                             \
          $(SHELL) build-aux/vc-list-files tests                        \
            | grep -Ev '^tests/(factor/(run|create-test)|init)\.sh$$'   \
-           | grep -E "$$test_extensions_rx\$$";                        \
+           | grep -E "($$test_extensions_rx)$$";                       \
        } | sort | uniq -u | grep . && exit 1; :
 
 # Ensure that all version-controlled test scripts are executable.