Mercurial > hg-stable
changeset 35175:4c04fd032af6
tests: fix regex in test-subrepo-git.t to match entire string
Due to a bug in the test runner (fixed by the next commit), the regex
used for matching lines like " foobar | 2 +-" stoppped at the "|" and
the test passed even though the rest of the line did not match. The
test seems to have been supposed to match "|" and "+" literally on
those lines, so this changes the regex to escape those characters. It
also changes a "\s*" to "\s+" since I think we'll always include a
space after the "|" in the diffstat output.
Differential Revision: https://phab.mercurial-scm.org/D1545
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 29 Nov 2017 10:58:32 -0800 |
parents | 273907306a39 |
children | 6d5718e39657 |
files | tests/test-subrepo-git.t |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-subrepo-git.t Wed Nov 29 17:06:45 2017 -0500 +++ b/tests/test-subrepo-git.t Wed Nov 29 10:58:32 2017 -0800 @@ -847,8 +847,8 @@ the output contains a regex, because git 1.7.10 and 1.7.11 change the amount of whitespace $ hg diff --subrepos --stat - \s*barfoo |\s*1 + (re) - \s*foobar |\s*2 +- (re) + \s*barfoo \|\s+1 \+ (re) + \s*foobar \|\s+2 \+- (re) 2 files changed, 2 insertions\(\+\), 1 deletions?\(-\) (re) adding an include should ignore the other elements