Skip to content

Commit

Permalink
Update selftest to use os.getcwd() instead of pwd
Browse files Browse the repository at this point in the history
  • Loading branch information
denik committed Jan 24, 2025
1 parent 54349f4 commit 8c87ce5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions acceptance/selftest/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions acceptance/selftest/script
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8c87ce5

Please sign in to comment.