-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
88 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*.pyc | ||
*.out |
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,21 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# test the script on itself | ||
./utfpyc.py -f utfpyc.py utfpyc.pyc | ||
# run the result again | ||
python3 utfpyc.pyc -f utfpyc.py utfpyc2.pyc | ||
cmp utfpyc.pyc utfpyc2.pyc | ||
|
||
for script in test/*.py; do | ||
# compare the original script and self-compiled script results on tests | ||
./utfpyc.py "$script" "${script%.py}.pyc" | ||
python3 utfpyc.pyc "$script" "${script%.py}.pyc.pyc" | ||
cmp "${script%.py}.pyc" "${script%.py}.pyc.pyc" | ||
# run the test | ||
python3 "$script" >"$script.out" | ||
python3 "${script%.py}.pyc" >"${script%.py}.pyc.out" | ||
cmp "$script.out" "${script%.py}.pyc.out" | ||
done | ||
|
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