##// END OF EJS Templates
tests: add new test for #! shebang lines...
timeless -
r28879:8c1759a2 default
parent child Browse files
Show More
@@ -1,23 +1,13 b''
1 #require test-repo execbit
1 #require test-repo
2
2
3 $ cd "`dirname "$TESTDIR"`"
3 $ cd "`dirname "$TESTDIR"`"
4
4
5 look for python scripts without the execute bit
5 look for python scripts that do not use /usr/bin/env
6
6
7 $ hg files 'set:**.py and not exec() and grep(r"^#!.*?python")'
7 $ hg files 'set:grep(r"^#!.*?python") and not grep(r"^#!/usr/bin/env python")'
8 [1]
9
10 look for python scripts with execute bit but not shebang
11
12 $ hg files 'set:**.py and exec() and not grep(r"^#!.*?python")'
13 [1]
8 [1]
14
9
15 look for shell scripts with execute bit but not shebang
10 look for shell scripts that do not use /bin/sh
16
17 $ hg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")'
18 [1]
19
11
20 look for non scripts with no shebang
12 $ hg files 'set:grep(r"^#!.*/bin/sh") and not grep(r"^#!/bin/sh")'
21
22 $ hg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")'
23 [1]
13 [1]
General Comments 0
You need to be logged in to leave comments. Login now