##// END OF EJS Templates
tests: use $PYTHON in #! so we always use the right Python
Augie Fackler -
r32938:b6776b34 default
parent child Browse files
Show More
@@ -453,7 +453,7 b' assuming that the shell returns 127 if c'
453 453 test bisecting command
454 454
455 455 $ cat > script.py <<EOF
456 > #!/usr/bin/env python
456 > #!$PYTHON
457 457 > import sys
458 458 > from mercurial import ui, hg
459 459 > repo = hg.repository(ui.ui.load(), '.')
@@ -249,7 +249,7 b' Edit with extdiff -p:'
249 249 Prepare custom diff/edit tool:
250 250
251 251 $ cat > 'diff tool.py' << EOT
252 > #!/usr/bin/env python
252 > #!$PYTHON
253 253 > import time
254 254 > time.sleep(1) # avoid unchanged-timestamp problems
255 255 > file('a/a', 'ab').write('edited\n')
@@ -98,7 +98,7 b' Command with no output, we just want to '
98 98 Check hgweb's load order:
99 99
100 100 $ cat > hgweb.cgi <<EOF
101 > #!/usr/bin/env python
101 > #!$PYTHON
102 102 > from mercurial import demandimport; demandimport.enable()
103 103 > from mercurial.hgweb import hgweb
104 104 > from mercurial.hgweb import wsgicgi
@@ -956,7 +956,7 b' We attempt to highlight unknown files by'
956 956 > EOF
957 957
958 958 $ cat > unknownfile << EOF
959 > #!/usr/bin/python
959 > #!$PYTHON
960 960 > def foo():
961 961 > pass
962 962 > EOF
@@ -93,7 +93,7 b' Verify that largefiles from pulled branc'
93 93 Portable way to print file permissions:
94 94
95 95 $ cat > ls-l.py <<EOF
96 > #!/usr/bin/env python
96 > #!$PYTHON
97 97 > import sys, os
98 98 > path = sys.argv[1]
99 99 > print '%03o' % (os.lstat(path).st_mode & 0777)
@@ -215,7 +215,7 b' Test display of largefiles in hgweb'
215 215 Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail)
216 216
217 217 $ cat <<EOF > "$TESTTMP/hgweb.cgi"
218 > #!/usr/bin/env python
218 > #!$PYTHON
219 219 > from mercurial import demandimport; demandimport.enable()
220 220 > from mercurial.hgweb import hgweb
221 221 > from mercurial.hgweb import wsgicgi
@@ -1,5 +1,5 b''
1 1 $ cat > echo.py <<EOF
2 > #!/usr/bin/env python
2 > #!$PYTHON
3 3 > import os, sys
4 4 > try:
5 5 > import msvcrt
@@ -5,7 +5,7 b' before d74fc8dec2b4 still work.'
5 5
6 6 $ hg init test
7 7 $ cat >hgweb.cgi <<HGWEB
8 > #!/usr/bin/env python
8 > #!$PYTHON
9 9 > #
10 10 > # An example CGI script to use hgweb, edit as necessary
11 11 >
@@ -31,7 +31,7 b' before d74fc8dec2b4 still work.'
31 31 > HGWEBDIRCONF
32 32
33 33 $ cat >hgwebdir.cgi <<HGWEBDIR
34 > #!/usr/bin/env python
34 > #!$PYTHON
35 35 > #
36 36 > # An example CGI script to export multiple hgweb repos, edit as necessary
37 37 >
@@ -5,7 +5,7 b' This is a rudimentary test of the CGI fi'
5 5 $ hg init test
6 6
7 7 $ cat >hgweb.cgi <<HGWEB
8 > #!/usr/bin/env python
8 > #!$PYTHON
9 9 > #
10 10 > # An example CGI script to use hgweb, edit as necessary
11 11 >
@@ -28,7 +28,7 b' This is a rudimentary test of the CGI fi'
28 28 > HGWEBDIRCONF
29 29
30 30 $ cat >hgwebdir.cgi <<HGWEBDIR
31 > #!/usr/bin/env python
31 > #!$PYTHON
32 32 > #
33 33 > # An example CGI script to export multiple hgweb repos, edit as necessary
34 34 >
@@ -4,7 +4,7 b' This tests if CGI files from before d0db'
4 4
5 5 $ hg init test
6 6 $ cat >hgweb.cgi <<HGWEB
7 > #!/usr/bin/env python
7 > #!$PYTHON
8 8 > #
9 9 > # An example CGI script to use hgweb, edit as necessary
10 10 >
@@ -26,7 +26,7 b' This tests if CGI files from before d0db'
26 26 > HGWEBDIRCONF
27 27
28 28 $ cat >hgwebdir.cgi <<HGWEBDIR
29 > #!/usr/bin/env python
29 > #!$PYTHON
30 30 > #
31 31 > # An example CGI script to export multiple hgweb repos, edit as necessary
32 32 >
General Comments 0
You need to be logged in to leave comments. Login now