changeset 6867:cdd1ffb88dd6 stable

tests: replace obsolescent egrep with grep -E This avoids the warning “egrep: warning: egrep is obsolescent; using grep -E” on my Arch Linux system. This is similar to 7e5be4a7cda7 in core.
author Manuel Jacob <me@manueljacob.de>
date Fri, 02 Feb 2024 00:09:51 +0100
parents cfad86381358
children b3261527f770
files tests/test-check-sdist.t tests/test-check-tag.t tests/test-extension-isolation.t
diffstat 3 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-check-sdist.t	Fri Aug 02 16:29:10 2024 +0400
+++ b/tests/test-check-sdist.t	Fri Feb 02 00:09:51 2024 +0100
@@ -35,8 +35,8 @@
   hg?evolve-*.tar.gz (glob)
 
   $ tar -tzf hg?evolve-*.tar.gz | sed 's|^hg.evolve-[^/]*/||' | sort > files
-  $ egrep '^tests/test-.*\.(t|py)$' files > test-files
-  $ egrep -v '^tests/test-.*\.(t|py)$' files > other-files
+  $ grep -E '^tests/test-.*\.(t|py)$' files > test-files
+  $ grep -E -v '^tests/test-.*\.(t|py)$' files > other-files
   $ wc -l other-files
   ??? other-files (glob)
   $ wc -l test-files
@@ -57,7 +57,7 @@
   docs/tutorial/README.rst
   hgext3rd/topic/README
 
-  $ egrep '(gitlab|contrib|hack|format-source)' files
+  $ grep -E '(gitlab|contrib|hack|format-source)' files
   [1]
   $ fgrep legacy.py files
   [1]
--- a/tests/test-check-tag.t	Fri Aug 02 16:29:10 2024 +0400
+++ b/tests/test-check-tag.t	Fri Feb 02 00:09:51 2024 +0100
@@ -30,7 +30,7 @@
   >   if [ -z "$entry" ]; then
   >     echo "Revision $node has no CHANGELOG entry for $tags"
   >   fi
-  >   if echo "$entry" | egrep -vq ' -- [0-9]{4}-[0-9]{2}-[0-9]{2}'; then
+  >   if echo "$entry" | grep -E -vq ' -- [0-9]{4}-[0-9]{2}-[0-9]{2}'; then
   >     echo "CHANGELOG entry for $tags should have a date in YYYY-MM-DD format: $entry"
   >   fi
   >   entry=`hg cat --rev $node debian/changelog | fgrep "$tags"`
--- a/tests/test-extension-isolation.t	Fri Aug 02 16:29:10 2024 +0400
+++ b/tests/test-extension-isolation.t	Fri Feb 02 00:09:51 2024 +0100
@@ -117,34 +117,34 @@
 Check evolve isolation
 -----------------------
 
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | grep -E 'topics|evoext'
   [1]
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-evo | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-evo | grep -E 'topics|evoext'
     _evoext_getbundle_obscommon
     _evoext_obshashrange_v1
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | grep -E 'topics|evoext'
   [1]
 
 Check topic isolation
 ---------------------
 
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | grep -E 'topics|evoext'
   [1]
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-topic | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-topic | grep -E 'topics|evoext'
     _exttopics_heads
     ext-topics-publish=all
     ext-topics-tns-heads
     topics
     topics-namespaces
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | grep -E 'topics|evoext'
   [1]
 
 Check coupled isolation
 -----------------------
 
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | grep -E 'topics|evoext'
   [1]
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-both | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-both | grep -E 'topics|evoext'
     _evoext_getbundle_obscommon
     _evoext_obshashrange_v1
     _exttopics_heads
@@ -152,19 +152,19 @@
     ext-topics-tns-heads
     topics
     topics-namespaces
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-evo | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-evo | grep -E 'topics|evoext'
     _evoext_getbundle_obscommon
     _evoext_obshashrange_v1
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-topic | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-topic | grep -E 'topics|evoext'
     _exttopics_heads
     ext-topics-publish=all
     ext-topics-tns-heads
     topics
     topics-namespaces
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-evo | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-evo | grep -E 'topics|evoext'
     _evoext_getbundle_obscommon
     _evoext_obshashrange_v1
-  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | egrep 'topics|evoext'
+  $ hg debugcapabilities http://$LOCALIP:$HGPORT/repo-no-ext | grep -E 'topics|evoext'
   [1]
 
 Final cleanup