changeset 6669:aa51f19c71f6

tests: replace obsolescent fgrep with grep -F This avoids the warning “fgrep: warning: fgrep is obsolescent; using grep -F” on my Arch Linux system. This is similar to 65f949da8469 in core.
author Manuel Jacob <me@manueljacob.de>
date Fri, 02 Feb 2024 00:12:49 +0100
parents 02f8c88f3d59
children e0712a00154e
files tests/test-check-sdist.t tests/test-check-tag.t
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-check-sdist.t	Fri Feb 02 00:09:51 2024 +0100
+++ b/tests/test-check-sdist.t	Fri Feb 02 00:12:49 2024 +0100
@@ -40,17 +40,17 @@
   146 other-files
   $ wc -l test-files
   ??? test-files (glob)
-  $ fgrep debian files
+  $ grep -F debian files
   tests/test-check-debian.t
-  $ fgrep __init__.py files
+  $ grep -F __init__.py files
   hgext3rd/__init__.py
   hgext3rd/evolve/__init__.py
   hgext3rd/evolve/thirdparty/__init__.py
   hgext3rd/topic/__init__.py
-  $ fgrep common.sh files
+  $ grep -F common.sh files
   docs/tutorial/testlib/common.sh
   tests/testlib/common.sh
-  $ fgrep README files
+  $ grep -F README files
   README.rst
   docs/README
   docs/tutorial/README.rst
@@ -58,5 +58,5 @@
 
   $ grep -E '(gitlab|contrib|hack|format-source)' files
   [1]
-  $ fgrep netlify files
+  $ grep -F netlify files
   [1]
--- a/tests/test-check-tag.t	Fri Feb 02 00:09:51 2024 +0100
+++ b/tests/test-check-tag.t	Fri Feb 02 00:12:49 2024 +0100
@@ -26,14 +26,14 @@
   >   if hg grep --rev $node '^__version__ = .*\.dev' hgext3rd/evolve/ hgext3rd/topic/; then
   >     echo "Versions should not end with .dev at tagged revision $node"
   >   fi
-  >   entry=`hg cat --rev $node CHANGELOG | fgrep "$tags"`
+  >   entry=`hg cat --rev $node CHANGELOG | grep -F "$tags"`
   >   if [ -z "$entry" ]; then
   >     echo "Revision $node has no CHANGELOG entry for $tags"
   >   fi
   >   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"`
+  >   entry=`hg cat --rev $node debian/changelog | grep -F "$tags"`
   >   if [ -z "$entry" ]; then
   >     echo "Revision $node has no debian/changelog entry for $tags"
   >   fi