diff tests/test-upgrade-repo.t @ 50725:7e5be4a7cda7 stable

tests: use grep -E instead of obsolescent egrep Testing on Fedora 38 failed with: egrep: warning: egrep is obsolescent; using grep -E The warning comes from https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1 . For further anecdotal evidence of the change, see https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep . This reverses the code check that goes back to e7d3b509af8b. grep -E is POSIX, but there is a risk that it doesn't work the same on all platforms - especially older Unix versions. It should however always be possible to put a GNU grep in $PATH before running the tests.
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 26 Jun 2023 14:34:58 +0200
parents a41eeb877d07
children 786b6225793a
line wrap: on
line diff
--- a/tests/test-upgrade-repo.t	Mon Jun 26 11:15:30 2023 +0100
+++ b/tests/test-upgrade-repo.t	Mon Jun 26 14:34:58 2023 +0200
@@ -2013,7 +2013,7 @@
 For multiple change at the same time
 ------------------------------------
 
-  $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
+  $ hg debugformat -R auto-upgrade | grep -E '(dirstate-v2|tracked|share-safe)'
   dirstate-v2:         no
   tracked-hint:       yes
   share-safe:          no
@@ -2031,7 +2031,7 @@
   (see `hg help config.format.use-share-safe` for details)
   automatically downgrading repository from the `tracked-hint` feature
   (see `hg help config.format.use-dirstate-tracked-hint` for details)
-  $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
+  $ hg debugformat -R auto-upgrade | grep -E '(dirstate-v2|tracked|share-safe)'
   dirstate-v2:        yes
   tracked-hint:        no
   share-safe:         yes
@@ -2040,7 +2040,7 @@
 ---------------------------
 
 
-  $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
+  $ hg debugformat -R auto-upgrade | grep -E '(dirstate-v2|tracked|share-safe)'
   dirstate-v2:        yes
   tracked-hint:        no
   share-safe:         yes
@@ -2055,7 +2055,7 @@
   >     --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \
   >     --config format.use-share-safe=no
 
-  $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
+  $ hg debugformat -R auto-upgrade | grep -E '(dirstate-v2|tracked|share-safe)'
   dirstate-v2:         no
   tracked-hint:       yes
   share-safe:          no
@@ -2070,7 +2070,7 @@
   >     --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
   >     --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \
   >     --config format.use-share-safe=yes
-  $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
+  $ hg debugformat -R auto-upgrade | grep -E '(dirstate-v2|tracked|share-safe)'
   dirstate-v2:        yes
   tracked-hint:        no
   share-safe:         yes