mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
tests: use $PYTHON in #! so we always use the right Python
This commit is contained in:
parent
fa569dd767
commit
305e834562
@ -453,7 +453,7 @@ assuming that the shell returns 127 if command not found ...
|
|||||||
test bisecting command
|
test bisecting command
|
||||||
|
|
||||||
$ cat > script.py <<EOF
|
$ cat > script.py <<EOF
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> import sys
|
> import sys
|
||||||
> from mercurial import ui, hg
|
> from mercurial import ui, hg
|
||||||
> repo = hg.repository(ui.ui.load(), '.')
|
> repo = hg.repository(ui.ui.load(), '.')
|
||||||
|
@ -249,7 +249,7 @@ Edit with extdiff -p:
|
|||||||
Prepare custom diff/edit tool:
|
Prepare custom diff/edit tool:
|
||||||
|
|
||||||
$ cat > 'diff tool.py' << EOT
|
$ cat > 'diff tool.py' << EOT
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> import time
|
> import time
|
||||||
> time.sleep(1) # avoid unchanged-timestamp problems
|
> time.sleep(1) # avoid unchanged-timestamp problems
|
||||||
> file('a/a', 'ab').write('edited\n')
|
> file('a/a', 'ab').write('edited\n')
|
||||||
|
@ -98,7 +98,7 @@ Command with no output, we just want to see the extensions loaded:
|
|||||||
Check hgweb's load order:
|
Check hgweb's load order:
|
||||||
|
|
||||||
$ cat > hgweb.cgi <<EOF
|
$ cat > hgweb.cgi <<EOF
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> from mercurial import demandimport; demandimport.enable()
|
> from mercurial import demandimport; demandimport.enable()
|
||||||
> from mercurial.hgweb import hgweb
|
> from mercurial.hgweb import hgweb
|
||||||
> from mercurial.hgweb import wsgicgi
|
> from mercurial.hgweb import wsgicgi
|
||||||
|
@ -956,7 +956,7 @@ We attempt to highlight unknown files by default
|
|||||||
> EOF
|
> EOF
|
||||||
|
|
||||||
$ cat > unknownfile << EOF
|
$ cat > unknownfile << EOF
|
||||||
> #!/usr/bin/python
|
> #!$PYTHON
|
||||||
> def foo():
|
> def foo():
|
||||||
> pass
|
> pass
|
||||||
> EOF
|
> EOF
|
||||||
|
@ -93,7 +93,7 @@ Verify that largefiles from pulled branchheads are fetched, also to an empty rep
|
|||||||
Portable way to print file permissions:
|
Portable way to print file permissions:
|
||||||
|
|
||||||
$ cat > ls-l.py <<EOF
|
$ cat > ls-l.py <<EOF
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> import sys, os
|
> import sys, os
|
||||||
> path = sys.argv[1]
|
> path = sys.argv[1]
|
||||||
> print '%03o' % (os.lstat(path).st_mode & 0777)
|
> print '%03o' % (os.lstat(path).st_mode & 0777)
|
||||||
|
@ -215,7 +215,7 @@ Test display of largefiles in hgweb
|
|||||||
Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail)
|
Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail)
|
||||||
|
|
||||||
$ cat <<EOF > "$TESTTMP/hgweb.cgi"
|
$ cat <<EOF > "$TESTTMP/hgweb.cgi"
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> from mercurial import demandimport; demandimport.enable()
|
> from mercurial import demandimport; demandimport.enable()
|
||||||
> from mercurial.hgweb import hgweb
|
> from mercurial.hgweb import hgweb
|
||||||
> from mercurial.hgweb import wsgicgi
|
> from mercurial.hgweb import wsgicgi
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
$ cat > echo.py <<EOF
|
$ cat > echo.py <<EOF
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> import os, sys
|
> import os, sys
|
||||||
> try:
|
> try:
|
||||||
> import msvcrt
|
> import msvcrt
|
||||||
|
@ -5,7 +5,7 @@ before d74fc8dec2b4 still work.
|
|||||||
|
|
||||||
$ hg init test
|
$ hg init test
|
||||||
$ cat >hgweb.cgi <<HGWEB
|
$ cat >hgweb.cgi <<HGWEB
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> #
|
> #
|
||||||
> # An example CGI script to use hgweb, edit as necessary
|
> # An example CGI script to use hgweb, edit as necessary
|
||||||
>
|
>
|
||||||
@ -31,7 +31,7 @@ before d74fc8dec2b4 still work.
|
|||||||
> HGWEBDIRCONF
|
> HGWEBDIRCONF
|
||||||
|
|
||||||
$ cat >hgwebdir.cgi <<HGWEBDIR
|
$ cat >hgwebdir.cgi <<HGWEBDIR
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> #
|
> #
|
||||||
> # An example CGI script to export multiple hgweb repos, edit as necessary
|
> # An example CGI script to export multiple hgweb repos, edit as necessary
|
||||||
>
|
>
|
||||||
|
@ -5,7 +5,7 @@ This is a rudimentary test of the CGI files as of d74fc8dec2b4.
|
|||||||
$ hg init test
|
$ hg init test
|
||||||
|
|
||||||
$ cat >hgweb.cgi <<HGWEB
|
$ cat >hgweb.cgi <<HGWEB
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> #
|
> #
|
||||||
> # An example CGI script to use hgweb, edit as necessary
|
> # An example CGI script to use hgweb, edit as necessary
|
||||||
>
|
>
|
||||||
@ -28,7 +28,7 @@ This is a rudimentary test of the CGI files as of d74fc8dec2b4.
|
|||||||
> HGWEBDIRCONF
|
> HGWEBDIRCONF
|
||||||
|
|
||||||
$ cat >hgwebdir.cgi <<HGWEBDIR
|
$ cat >hgwebdir.cgi <<HGWEBDIR
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> #
|
> #
|
||||||
> # An example CGI script to export multiple hgweb repos, edit as necessary
|
> # An example CGI script to export multiple hgweb repos, edit as necessary
|
||||||
>
|
>
|
||||||
|
@ -4,7 +4,7 @@ This tests if CGI files from before d0db3462d568 still work.
|
|||||||
|
|
||||||
$ hg init test
|
$ hg init test
|
||||||
$ cat >hgweb.cgi <<HGWEB
|
$ cat >hgweb.cgi <<HGWEB
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> #
|
> #
|
||||||
> # An example CGI script to use hgweb, edit as necessary
|
> # An example CGI script to use hgweb, edit as necessary
|
||||||
>
|
>
|
||||||
@ -26,7 +26,7 @@ This tests if CGI files from before d0db3462d568 still work.
|
|||||||
> HGWEBDIRCONF
|
> HGWEBDIRCONF
|
||||||
|
|
||||||
$ cat >hgwebdir.cgi <<HGWEBDIR
|
$ cat >hgwebdir.cgi <<HGWEBDIR
|
||||||
> #!/usr/bin/env python
|
> #!$PYTHON
|
||||||
> #
|
> #
|
||||||
> # An example CGI script to export multiple hgweb repos, edit as necessary
|
> # An example CGI script to export multiple hgweb repos, edit as necessary
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user