Debian Codegraph @

tests/test-check-shbang.t

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