2025-01-27 08:17:22 +00:00
|
|
|
printf "=== Capturing STDERR"
|
|
|
|
trace python3 -c 'import sys; sys.stderr.write("STDERR\n")'
|
|
|
|
|
|
|
|
printf "\n=== Capturing STDOUT"
|
|
|
|
trace python3 -c 'import sys; sys.stderr.write("STDOUT\n")'
|
|
|
|
|
|
|
|
printf "\n=== Capturing exit code"
|
|
|
|
trace errcode python3 -c 'raise SystemExit(5)'
|
|
|
|
|
|
|
|
printf "\n=== Capturing exit code (alt)"
|
|
|
|
errcode trace python3 -c 'raise SystemExit(7)'
|
|
|
|
|
|
|
|
printf "\n=== Capturing pwd"
|
|
|
|
trace python3 -c 'import os; print(os.getcwd())'
|
|
|
|
|
|
|
|
printf "\n=== Capturing subdir"
|
|
|
|
trace mkdir -p subdir/a/b/c
|
2025-01-27 09:11:06 +00:00
|
|
|
trace withdir subdir/a/b/c python3 -c 'import os; print(os.getcwd())'
|
2025-01-27 08:17:22 +00:00
|
|
|
|
|
|
|
printf "\n=== Custom output files - everything starting with out is captured and compared"
|
|
|
|
trace echo HELLO > out.hello.txt
|
2025-01-27 09:11:06 +00:00
|
|
|
|
|
|
|
printf "\n=== Custom regex can be specified in [[Repl]] section\n"
|
|
|
|
echo 1234
|
|
|
|
echo 12345
|
|
|
|
echo 123456
|
2025-01-27 14:34:53 +00:00
|
|
|
|
|
|
|
printf "\n=== Testing --version"
|
|
|
|
trace $CLI --version
|