Mercurial > hg-stable
changeset 25861:11ab8714f529 stable
tests: use egrep with regular expression branches for compatibility
GNU grep allows you to use "a\|b" in a regular expression to match either
"a" or "b", but at least Solaris grep does not; only egrep allows for that.
And egrep considers "a+" to be "a{1,}" instead of an "a" and a literal plus
sign, so escape that as well.
author | Danek Duvall <danek.duvall@oracle.com> |
---|---|
date | Mon, 20 Jul 2015 15:33:20 -0700 |
parents | 895f04955a49 |
children | 7316a2847c63 |
files | tests/test-command-template.t |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-command-template.t Mon Jul 20 23:38:56 2015 +0900 +++ b/tests/test-command-template.t Mon Jul 20 15:33:20 2015 -0700 @@ -120,7 +120,7 @@ $ hg log --style default > style.out $ cmp log.out style.out || diff -u log.out style.out $ hg log -T phases > phases.out - $ diff -U 0 log.out phases.out | grep -v '^---\|^+++' + $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+' @@ -2,0 +3 @@ +phase: draft @@ -6,0 +8 @@ @@ -146,7 +146,7 @@ $ hg log -v --style default > style.out $ cmp log.out style.out || diff -u log.out style.out $ hg log -v -T phases > phases.out - $ diff -U 0 log.out phases.out | grep -v '^---\|^+++' + $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+' @@ -2,0 +3 @@ +phase: draft @@ -7,0 +9 @@ @@ -212,7 +212,7 @@ $ hg --color=debug log --style default > style.out $ cmp log.out style.out || diff -u log.out style.out $ hg --color=debug log -T phases > phases.out - $ diff -U 0 log.out phases.out | grep -v '^---\|^+++' + $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+' @@ -2,0 +3 @@ +[log.phase|phase: draft] @@ -6,0 +8 @@ @@ -238,7 +238,7 @@ $ hg --color=debug -v log --style default > style.out $ cmp log.out style.out || diff -u log.out style.out $ hg --color=debug -v log -T phases > phases.out - $ diff -U 0 log.out phases.out | grep -v '^---\|^+++' + $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+' @@ -2,0 +3 @@ +[log.phase|phase: draft] @@ -7,0 +9 @@