changeset 6668:02f8c88f3d59

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 31e157a5cfe2
children aa51f19c71f6
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	Thu Feb 01 23:58:40 2024 +0100
+++ b/tests/test-check-sdist.t	Fri Feb 02 00:09:51 2024 +0100
@@ -34,8 +34,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
   146 other-files
   $ wc -l test-files
@@ -56,7 +56,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 netlify files
   [1]
--- a/tests/test-check-tag.t	Thu Feb 01 23:58:40 2024 +0100
+++ 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	Thu Feb 01 23:58:40 2024 +0100
+++ 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