Update selftest to use os.getcwd() instead of pwd

This commit is contained in:
Denis Bilenko 2025-01-24 18:31:29 +01:00
parent 6c368939b0
commit ad6045c001
2 changed files with 4 additions and 4 deletions

View File

@ -17,13 +17,13 @@ Exit code: 5
Exit code: 7
=== Capturing pwd
>>> pwd
>>> python3 -c import os; print(os.getcwd())
$TMPDIR
=== Capturing subdir
>>> 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
=== Custom output files - everything starting with out is captured and compared

View File

@ -11,11 +11,11 @@ printf "\n=== Capturing exit code (alt)"
errcode trace python3 -c 'raise SystemExit(7)'
printf "\n=== Capturing pwd"
trace pwd
trace python3 -c 'import os; print(os.getcwd())'
printf "\n=== Capturing subdir"
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"
trace echo HELLO > out.hello.txt