mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +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
|
||||
|
||||
$ cat > script.py <<EOF
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> import sys
|
||||
> from mercurial import ui, hg
|
||||
> repo = hg.repository(ui.ui.load(), '.')
|
||||
|
@ -249,7 +249,7 @@ Edit with extdiff -p:
|
||||
Prepare custom diff/edit tool:
|
||||
|
||||
$ cat > 'diff tool.py' << EOT
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> import time
|
||||
> time.sleep(1) # avoid unchanged-timestamp problems
|
||||
> 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:
|
||||
|
||||
$ cat > hgweb.cgi <<EOF
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> from mercurial import demandimport; demandimport.enable()
|
||||
> from mercurial.hgweb import hgweb
|
||||
> from mercurial.hgweb import wsgicgi
|
||||
|
@ -956,7 +956,7 @@ We attempt to highlight unknown files by default
|
||||
> EOF
|
||||
|
||||
$ cat > unknownfile << EOF
|
||||
> #!/usr/bin/python
|
||||
> #!$PYTHON
|
||||
> def foo():
|
||||
> pass
|
||||
> EOF
|
||||
|
@ -93,7 +93,7 @@ Verify that largefiles from pulled branchheads are fetched, also to an empty rep
|
||||
Portable way to print file permissions:
|
||||
|
||||
$ cat > ls-l.py <<EOF
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> import sys, os
|
||||
> path = sys.argv[1]
|
||||
> 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)
|
||||
|
||||
$ cat <<EOF > "$TESTTMP/hgweb.cgi"
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> from mercurial import demandimport; demandimport.enable()
|
||||
> from mercurial.hgweb import hgweb
|
||||
> from mercurial.hgweb import wsgicgi
|
||||
|
@ -1,5 +1,5 @@
|
||||
$ cat > echo.py <<EOF
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> import os, sys
|
||||
> try:
|
||||
> import msvcrt
|
||||
|
@ -5,7 +5,7 @@ before d74fc8dec2b4 still work.
|
||||
|
||||
$ hg init test
|
||||
$ cat >hgweb.cgi <<HGWEB
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> #
|
||||
> # An example CGI script to use hgweb, edit as necessary
|
||||
>
|
||||
@ -31,7 +31,7 @@ before d74fc8dec2b4 still work.
|
||||
> HGWEBDIRCONF
|
||||
|
||||
$ cat >hgwebdir.cgi <<HGWEBDIR
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> #
|
||||
> # 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
|
||||
|
||||
$ cat >hgweb.cgi <<HGWEB
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> #
|
||||
> # 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
|
||||
|
||||
$ cat >hgwebdir.cgi <<HGWEBDIR
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> #
|
||||
> # 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
|
||||
$ cat >hgweb.cgi <<HGWEB
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> #
|
||||
> # 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
|
||||
|
||||
$ cat >hgwebdir.cgi <<HGWEBDIR
|
||||
> #!/usr/bin/env python
|
||||
> #!$PYTHON
|
||||
> #
|
||||
> # An example CGI script to export multiple hgweb repos, edit as necessary
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user