comparison tests/test-devel-warnings.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 abbecb5cd6f3
children 5d092194ac37
comparison
equal deleted inserted replaced
50724:a10d823a8e3d 50725:7e5be4a7cda7
189 Stripping from a transaction 189 Stripping from a transaction
190 190
191 $ echo a > a 191 $ echo a > a
192 $ hg add a 192 $ hg add a
193 $ hg commit -m a 193 $ hg commit -m a
194 $ hg stripintr 2>&1 | egrep -v '^(\*\*| )' 194 $ hg stripintr 2>&1 | grep -E -v '^(\*\*| )'
195 Traceback (most recent call last): 195 Traceback (most recent call last):
196 *ProgrammingError: cannot strip from inside a transaction (glob) 196 *ProgrammingError: cannot strip from inside a transaction (glob)
197 197
198 $ hg oldanddeprecated 198 $ hg oldanddeprecated
199 devel-warn: foorbar is deprecated, go shopping 199 devel-warn: foorbar is deprecated, go shopping
382 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 7 382 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 7
383 #endif 383 #endif
384 384
385 Test programming error failure: 385 Test programming error failure:
386 386
387 $ hg buggytransaction 2>&1 | egrep -v '^ ' 387 $ hg buggytransaction 2>&1 | grep -E -v '^ '
388 ** Unknown exception encountered with possibly-broken third-party extension "buggylocking" (version N/A) 388 ** Unknown exception encountered with possibly-broken third-party extension "buggylocking" (version N/A)
389 ** which supports versions unknown of Mercurial. 389 ** which supports versions unknown of Mercurial.
390 ** Please disable "buggylocking" and try your action again. 390 ** Please disable "buggylocking" and try your action again.
391 ** If that fixes the bug please report it to the extension author. 391 ** If that fixes the bug please report it to the extension author.
392 ** Python * (glob) 392 ** Python * (glob)
394 ** Extensions loaded: * (glob) 394 ** Extensions loaded: * (glob)
395 ** ProgrammingError: transaction requires locking 395 ** ProgrammingError: transaction requires locking
396 Traceback (most recent call last): 396 Traceback (most recent call last):
397 *ProgrammingError: transaction requires locking (glob) 397 *ProgrammingError: transaction requires locking (glob)
398 398
399 $ hg programmingerror 2>&1 | egrep -v '^ ' 399 $ hg programmingerror 2>&1 | grep -E -v '^ '
400 ** Unknown exception encountered with possibly-broken third-party extension "buggylocking" (version N/A) 400 ** Unknown exception encountered with possibly-broken third-party extension "buggylocking" (version N/A)
401 ** which supports versions unknown of Mercurial. 401 ** which supports versions unknown of Mercurial.
402 ** Please disable "buggylocking" and try your action again. 402 ** Please disable "buggylocking" and try your action again.
403 ** If that fixes the bug please report it to the extension author. 403 ** If that fixes the bug please report it to the extension author.
404 ** Python * (glob) 404 ** Python * (glob)