Show More
@@ -1,14 +1,25 | |||||
1 | #require test-repo |
|
1 | #require test-repo | |
2 |
|
2 | |||
3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
4 | $ cd "`dirname "$TESTDIR"`" |
|
4 | $ cd "`dirname "$TESTDIR"`" | |
5 |
|
5 | |||
6 | look for python scripts that do not use /usr/bin/env |
|
6 | look for python scripts that do not use /usr/bin/env | |
7 |
|
7 | |||
8 | $ hg files 'set:grep(r"^#!.*?python") and not grep(r"^#!/usr/bi{1}n/env python")' |
|
8 | $ hg files 'set:grep(r"^#!.*?python") and not grep(r"^#!/usr/bi{1}n/env python") - **/*.t' | |
9 | [1] |
|
9 | [1] | |
10 |
|
10 | |||
|
11 | In tests, enforce $PYTHON and *not* /usr/bin/env python or similar: | |||
|
12 | $ hg files 'set:grep(r"#!.*?python") and **/*.t' \ | |||
|
13 | > -X tests/test-check-execute.t \ | |||
|
14 | > -X tests/test-check-module-imports.t \ | |||
|
15 | > -X tests/test-check-pyflakes.t \ | |||
|
16 | > -X tests/test-check-shbang.t | |||
|
17 | [1] | |||
|
18 | ||||
|
19 | The above exclusions are because they're looking for files that | |||
|
20 | contain Python but don't end in .py - please avoid adding more. | |||
|
21 | ||||
11 | look for shell scripts that do not use /bin/sh |
|
22 | look for shell scripts that do not use /bin/sh | |
12 |
|
23 | |||
13 | $ hg files 'set:grep(r"^#!.*/bi{1}n/sh") and not grep(r"^#!/bi{1}n/sh")' |
|
24 | $ hg files 'set:grep(r"^#!.*/bi{1}n/sh") and not grep(r"^#!/bi{1}n/sh")' | |
14 | [1] |
|
25 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now