Mercurial > hg
diff tests/test-obsolete-divergent.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 | 6063c1857d0a |
children |
line wrap: on
line diff
--- a/tests/test-obsolete-divergent.t Mon Jun 26 11:15:30 2023 +0100 +++ b/tests/test-obsolete-divergent.t Mon Jun 26 14:34:58 2023 +0200 @@ -674,19 +674,19 @@ check an obsolete changeset that was rewritten and also split - $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=paper' | egrep 'rewritten|split' + $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=paper' | grep -E 'rewritten|split' <td>rewritten as <a href="/rev/bed64f5d2f5a?style=paper">bed64f5d2f5a</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span><br> split as <a href="/rev/7ae126973a96?style=paper">7ae126973a96</a> <a href="/rev/14608b260df8?style=paper">14608b260df8</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> - $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=coal' | egrep 'rewritten|split' + $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=coal' | grep -E 'rewritten|split' <td>rewritten as <a href="/rev/bed64f5d2f5a?style=coal">bed64f5d2f5a</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span><br> split as <a href="/rev/7ae126973a96?style=coal">7ae126973a96</a> <a href="/rev/14608b260df8?style=coal">14608b260df8</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> - $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=gitweb' | egrep 'rewritten|split' + $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=gitweb' | grep -E 'rewritten|split' <td>rewritten as <a class="list" href="/rev/bed64f5d2f5a?style=gitweb">bed64f5d2f5a</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> <td>split as <a class="list" href="/rev/7ae126973a96?style=gitweb">7ae126973a96</a> <a class="list" href="/rev/14608b260df8?style=gitweb">14608b260df8</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> - $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=monoblue' | egrep 'rewritten|split' + $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=monoblue' | grep -E 'rewritten|split' <dd>rewritten as <a href="/rev/bed64f5d2f5a?style=monoblue">bed64f5d2f5a</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></dd> <dd>split as <a href="/rev/7ae126973a96?style=monoblue">7ae126973a96</a> <a href="/rev/14608b260df8?style=monoblue">14608b260df8</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></dd> - $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=spartan' | egrep 'rewritten|split' + $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=spartan' | grep -E 'rewritten|split' <td class="obsolete">rewritten as <a href="/rev/bed64f5d2f5a?style=spartan">bed64f5d2f5a</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> <td class="obsolete">split as <a href="/rev/7ae126973a96?style=spartan">7ae126973a96</a> <a href="/rev/14608b260df8?style=spartan">14608b260df8</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td>