Mercurial > hg
annotate tests/test-check-execute.t @ 31432:6e1c79578e5c
mq: explicitly tests for None
Changeset fd3d8eb7f545 removed the mutable default value, but did not explicitly
tested for None. Such implicit testing can introduce semantic and performance
issue. We move to an explicit testing for None as recommended by PEP8:
https://www.python.org/dev/peps/pep-0008/#programming-recommendations
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Wed, 15 Mar 2017 15:05:54 -0700 |
parents | 3c9066ed557c |
children | 6c113a7dec52 |
rev | line source |
---|---|
27569 | 1 #require test-repo execbit |
2 | |
29219
3c9066ed557c
tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents:
27569
diff
changeset
|
3 $ . "$TESTDIR/helpers-testrepo.sh" |
27569 | 4 $ cd "`dirname "$TESTDIR"`" |
5 | |
6 look for python scripts without the execute bit | |
7 | |
8 $ hg files 'set:**.py and not exec() and grep(r"^#!.*?python")' | |
9 [1] | |
10 | |
11 look for python scripts with execute bit but not shebang | |
12 | |
13 $ hg files 'set:**.py and exec() and not grep(r"^#!.*?python")' | |
14 [1] | |
15 | |
16 look for shell scripts with execute bit but not shebang | |
17 | |
18 $ hg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")' | |
19 [1] | |
20 | |
21 look for non scripts with no shebang | |
22 | |
23 $ hg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")' | |
24 [1] |