PyFunge source distribution contains some test suites in tests/. You check out them against current PyFunge version with pyfunge-test shell script:
$ ./pyfunge-test Done, XX out of XX test(s) passed.
This section discusses how the tests are organized and written.
Each test requires at least two files:
There are several optional files:
tests/ directory contains some directories to organize tests:
These directories are not important to the test script: they are just for convenience.
PyFunge contains a convenience script called mycology-filter in tools/ directory of the source distribution. This script, written in awk(1), highlights the result from Mycology test suite – it also analyzes some UNDEF lines and marks it as GOOD or BAD line if possible. It also distinguishes UNDEF lines due to the specification and UNDEF lines due to the limitation of test suite (i.e. UNSURE), so you have to check out only UNSURE lines.
Typical usage is as like this:
$ pyfunge mycology.b98 | mycology-filter 0 1 2 3 4 5 6 7 GOOD: , works GOOD: : duplicates GOOD: empty stack pops zero [...] The Mycology Befunge-98 test suite is practically done. Trying to quit with q. If the return status is 15, consider it GOOD... *** GOOD 365, BAD 0, UNDEF 49, UNSURE 64
Note that this script does not preserve the exit code, and you should check it by hand. This script is also not capable for mycoterm or mycouser tests.