Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
15371:f26ed4ea46d8 | 15372:695ac6aca77f |
---|---|
1 $ "$TESTDIR/hghave" pyflakes || exit 80 | 1 $ "$TESTDIR/hghave" pyflakes || exit 80 |
2 $ cd $(dirname $TESTDIR) | 2 $ cd `dirname $TESTDIR` |
3 $ pyflakes mercurial hgext 2>&1 | $TESTDIR/filterpyflakes.py | 3 $ pyflakes mercurial hgext 2>&1 | $TESTDIR/filterpyflakes.py |
4 hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob) | 4 hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob) |
5 | 5 |
6 | 6 |