mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 00:14:41 +01:00
Run same wc,pwd,cat from tests/bin on Windows.
Run without depending on py.exe
This commit is contained in:
parent
c22e80b717
commit
8740b15462
5 changed files with 10 additions and 48 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -62,6 +62,10 @@ rever/
|
|||
# Allow the lib
|
||||
!/xonsh/lib
|
||||
|
||||
|
||||
# Allow tests/bin
|
||||
!/tests/bin
|
||||
|
||||
# elm
|
||||
xonsh/webconfig/elm-stuff/
|
||||
xonsh/webconfig/js/app.js
|
||||
|
|
|
@ -1,15 +1 @@
|
|||
@echo on
|
||||
call :s_which py.exe
|
||||
rem note that %~dp0 is dir of this batch script
|
||||
if not "%_path%" == "" (
|
||||
py -3 %~dp0cat %*
|
||||
) else (
|
||||
python %~dp0cat %*
|
||||
)
|
||||
|
||||
goto :eof
|
||||
|
||||
:s_which
|
||||
setlocal
|
||||
endlocal & set _path=%~$PATH:1
|
||||
goto :eof
|
||||
@python %~dp0cat %*
|
||||
|
|
|
@ -1,15 +1 @@
|
|||
@echo on
|
||||
call :s_which py.exe
|
||||
rem note that %~dp0 is dir of this batch script
|
||||
if not "%_path%" == "" (
|
||||
py -3 %~dp0pwd %*
|
||||
) else (
|
||||
python %~dp0pwd %*
|
||||
)
|
||||
|
||||
goto :eof
|
||||
|
||||
:s_which
|
||||
setlocal
|
||||
endlocal & set _path=%~$PATH:1
|
||||
goto :eof
|
||||
@python %~dp0pwd %*
|
||||
|
|
|
@ -1,15 +1 @@
|
|||
@echo on
|
||||
call :s_which py.exe
|
||||
rem note that %~dp0 is dir of this batch script
|
||||
if not "%_path%" == "" (
|
||||
py -3 %~dp0wc %*
|
||||
) else (
|
||||
python %~dp0wc %*
|
||||
)
|
||||
|
||||
goto :eof
|
||||
|
||||
:s_which
|
||||
setlocal
|
||||
endlocal & set _path=%~$PATH:1
|
||||
goto :eof
|
||||
@python %~dp0wc %*
|
||||
|
|
|
@ -57,7 +57,7 @@ skip_if_no_sleep = pytest.mark.skipif(
|
|||
def run_xonsh(cmd, stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.STDOUT, single_command=False):
|
||||
env = dict(os.environ)
|
||||
env["PATH"] = PATH
|
||||
env["XONSH_DEBUG"] = "0" # was "1"
|
||||
env["XONSH_DEBUG"] = "0" # was "1"
|
||||
env["XONSH_SHOW_TRACEBACK"] = "1"
|
||||
env["RAISE_SUBPROC_ERROR"] = "0"
|
||||
env["PROMPT"] = ""
|
||||
|
@ -229,7 +229,7 @@ with open('tttt', 'w') as fp:
|
|||
|
||||
![cat tttt | wc]
|
||||
""",
|
||||
" 1 2 10\n" if ON_WINDOWS else " 1 2 9 <stdin>\n",
|
||||
" 1 2 10 <stdin>\n" if ON_WINDOWS else " 1 2 9 <stdin>\n",
|
||||
0,
|
||||
),
|
||||
# test double piping 'real' command
|
||||
|
@ -240,7 +240,7 @@ with open('tttt', 'w') as fp:
|
|||
|
||||
![cat tttt | wc | wc]
|
||||
""",
|
||||
" 1 3 24\n" if ON_WINDOWS else " 1 4 16 <stdin>\n",
|
||||
" 1 4 18 <stdin>\n" if ON_WINDOWS else " 1 4 16 <stdin>\n",
|
||||
0,
|
||||
),
|
||||
# test unthreadable alias (which should trigger a ProcPoxy call)
|
||||
|
|
Loading…
Add table
Reference in a new issue