match: override visitdir() in nevermatcher to return False
When we changed basematcher.visitdir() in
cf15c3cc304c (match: make
base matcher return True for visitdir, 2017-07-14), we forgot to add
an override in nevermatcher. This led to tests failing in narrowhg.
As Durham pointed out, it's high time to add unit tests for the
matcher, so this patch also adds a first unit test.
Differential Revision: https://phab.mercurial-scm.org/D151
run-tests: pre instantiate pygments objects
This speeds up run-tests.py diff output by 10x, which affects developer
experience significantly. As demonstrated by the following test:
```
#require pygments
$ for i in `seq 1 200`; do
> echo ' $ echo '$i >> test-a.t
> echo ' wrong' >> test-a.t
> done
$ cat > walltime.py <<EOF
> from __future__ import absolute_import, print_function
> import os, sys, time
> t1 = time.time()
> os.system(' '.join(sys.argv[1:]) + ' >/dev/null 2>/dev/null')
> t2 = time.time()
> print('%0.2f' % (t2 - t1))
> EOF
$ $PYTHON walltime.py $TESTDIR/run-tests.py -l --color=never $TESTTMP/test-a.t
0.24
Before this patch:
$ $PYTHON walltime.py $TESTDIR/run-tests.py -l --color=always $TESTTMP/test-a.t
2.46
After this patch:
$ $PYTHON walltime.py $TESTDIR/run-tests.py -l --color=always $TESTTMP/test-a.t
0.25
```