-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add acceptance/selftest, showcasing basic features (#2229)
Also make TestInprocessMode use this test.
- Loading branch information
Showing
6 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
HELLO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
=== Capturing STDERR | ||
>>> python3 -c import sys; sys.stderr.write("STDERR\n") | ||
STDERR | ||
|
||
=== Capturing STDOUT | ||
>>> python3 -c import sys; sys.stderr.write("STDOUT\n") | ||
STDOUT | ||
|
||
=== Capturing exit code | ||
>>> errcode python3 -c raise SystemExit(5) | ||
|
||
Exit code: 5 | ||
|
||
=== Capturing exit code (alt) | ||
>>> python3 -c raise SystemExit(7) | ||
|
||
Exit code: 7 | ||
|
||
=== Capturing pwd | ||
>>> python3 -c import os; print(os.getcwd()) | ||
$TMPDIR | ||
|
||
=== Capturing subdir | ||
>>> mkdir -p subdir/a/b/c | ||
|
||
>>> 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 | ||
>>> echo HELLO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Badness = "Brief description of what's wrong with the test output, if anything" | ||
|
||
#[GOOS] | ||
# Disable on Windows | ||
#windows = false | ||
|
||
# Disable on Mac | ||
#mac = false | ||
|
||
# Disable on Linux | ||
#linux = false |