Mercurial > public > mercurial-scm > hg
diff tests/test-check-pyflakes.t @ 15372:695ac6aca77f stable
check-code: fix issues with finding patterns in unified tests, fix tests
- old-style patterns without ^ were getting improperly anchored
- finditer was matching against beginning of line poorly
- \s was matching newlines
- [^x] was matching newlines
so we:
- remove earlier hacks for multiline matching
- fix unified test anchoring by adding .*
- replace \s with [ \t]
- replace [^x] with [^\nx]
- force all matches into multiline mode so ^ anchors work
This uncovers a number of test issues that are then repaired.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 27 Oct 2011 17:22:04 -0500 |
parents | fc035e5370ca |
children | 4f795f5fbb0b |
line wrap: on
line diff
--- a/tests/test-check-pyflakes.t Tue Oct 25 11:45:28 2011 -0400 +++ b/tests/test-check-pyflakes.t Thu Oct 27 17:22:04 2011 -0500 @@ -1,5 +1,5 @@ $ "$TESTDIR/hghave" pyflakes || exit 80 - $ cd $(dirname $TESTDIR) + $ cd `dirname $TESTDIR` $ pyflakes mercurial hgext 2>&1 | $TESTDIR/filterpyflakes.py hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob)