On 01/06/2024 15:02, Bernhard Voelker wrote:
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.
---
  cfg.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 2cfb31877..765d5bdeb 100644
--- 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.
--
2.45.1



Looks good.
You could also remove the redundant escaping,
i.e. \$$ -> $$ to be consistent with the rest of this file.

cheers,
Pádraig

Reply via email to