comparison tests/test-check-execute.t @ 33204:ddd65b4f3ae6

tests: alias syshg and syshgenv so they can be switched conditionally
author Yuya Nishihara <yuya@tcha.org>
date Sun, 02 Jul 2017 13:14:20 +0900
parents 6c113a7dec52
children fb6593307e24
comparison
equal deleted inserted replaced
33203:cf826b9e9ea4 33204:ddd65b4f3ae6
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 without the execute bit 6 look for python scripts without the execute bit
7 7
8 $ syshg files 'set:**.py and not exec() and grep(r"^#!.*?python")' 8 $ testrepohg files 'set:**.py and not exec() and grep(r"^#!.*?python")'
9 [1] 9 [1]
10 10
11 look for python scripts with execute bit but not shebang 11 look for python scripts with execute bit but not shebang
12 12
13 $ syshg files 'set:**.py and exec() and not grep(r"^#!.*?python")' 13 $ testrepohg files 'set:**.py and exec() and not grep(r"^#!.*?python")'
14 [1] 14 [1]
15 15
16 look for shell scripts with execute bit but not shebang 16 look for shell scripts with execute bit but not shebang
17 17
18 $ syshg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")' 18 $ testrepohg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")'
19 [1] 19 [1]
20 20
21 look for non scripts with no shebang 21 look for non scripts with no shebang
22 22
23 $ syshg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")' 23 $ testrepohg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")'
24 [1] 24 [1]