mirror of https://github.com/databricks/cli.git
Update selftest to use os.getcwd() instead of pwd
This commit is contained in:
parent
6c368939b0
commit
ad6045c001
|
@ -17,13 +17,13 @@ Exit code: 5
|
||||||
Exit code: 7
|
Exit code: 7
|
||||||
|
|
||||||
=== Capturing pwd
|
=== Capturing pwd
|
||||||
>>> pwd
|
>>> python3 -c import os; print(os.getcwd())
|
||||||
$TMPDIR
|
$TMPDIR
|
||||||
|
|
||||||
=== Capturing subdir
|
=== Capturing subdir
|
||||||
>>> mkdir -p subdir/a/b/c
|
>>> mkdir -p subdir/a/b/c
|
||||||
|
|
||||||
>>> withdir subdir/a/b/c pwd
|
>>> withdir subdir/a/b/c python3 -c import os; print(os.getcwd())
|
||||||
$TMPDIR/subdir/a/b/c
|
$TMPDIR/subdir/a/b/c
|
||||||
|
|
||||||
=== Custom output files - everything starting with out is captured and compared
|
=== Custom output files - everything starting with out is captured and compared
|
||||||
|
|
|
@ -11,11 +11,11 @@ printf "\n=== Capturing exit code (alt)"
|
||||||
errcode trace python3 -c 'raise SystemExit(7)'
|
errcode trace python3 -c 'raise SystemExit(7)'
|
||||||
|
|
||||||
printf "\n=== Capturing pwd"
|
printf "\n=== Capturing pwd"
|
||||||
trace pwd
|
trace python3 -c 'import os; print(os.getcwd())'
|
||||||
|
|
||||||
printf "\n=== Capturing subdir"
|
printf "\n=== Capturing subdir"
|
||||||
trace mkdir -p subdir/a/b/c
|
trace mkdir -p subdir/a/b/c
|
||||||
trace withdir subdir/a/b/c pwd | sed 's/\\/\//g'
|
trace withdir subdir/a/b/c python3 -c 'import os; print(os.getcwd())' | sed 's/\\/\//g'
|
||||||
|
|
||||||
printf "\n=== Custom output files - everything starting with out is captured and compared"
|
printf "\n=== Custom output files - everything starting with out is captured and compared"
|
||||||
trace echo HELLO > out.hello.txt
|
trace echo HELLO > out.hello.txt
|
||||||
|
|
Loading…
Reference in New Issue