From ad6045c001e5d3224b1609bbd11e6b99f61022f3 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Fri, 24 Jan 2025 18:31:29 +0100 Subject: [PATCH] Update selftest to use os.getcwd() instead of pwd --- acceptance/selftest/output.txt | 4 ++-- acceptance/selftest/script | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/acceptance/selftest/output.txt b/acceptance/selftest/output.txt index 87901ed84..d1830e01f 100644 --- a/acceptance/selftest/output.txt +++ b/acceptance/selftest/output.txt @@ -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 diff --git a/acceptance/selftest/script b/acceptance/selftest/script index 43d5c1146..89201d925 100644 --- a/acceptance/selftest/script +++ b/acceptance/selftest/script @@ -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