[SPOILER] Easy QOTW 2005-1 - Test Suite

Shlomi Fish <shlomif-ik1l9ssToec+JF/[email protected]> Mon, 24 Jan 2005 18:56:13 +0200
Newsgroups gmane.comp.lang.perl.qotw.discuss
Message-ID <[email protected]>
Hi all!

Attached is a relatively comprehensive test-suite to test the script for 
correctness. It includes all the tests that the quiz author gave as well as 
some of my own.

To use it:

1. cd to the Testing sub-dir.

2. run perl test.pl [mypath] where mypath is the path to the executable (it 
must be executable by the system) which implements the quiz.

3. test.pl exits by invoking diff -u -r. So if there are differences they will 
be displayed on screen. Plus, the exit code of the program will be 0 if 
everything's fine and non-zero otherwise.

To add more tests:

1. Add a file to the "in" sub-dir of Testing with valid input.

2. Add the expected and correct output to a file with the same name in the 
"expected" sub-dir of Testing.

Regards,

	Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      shlomif-ik1l9ssToec+JF/[email protected]
Homepage:        http://www.shlomifish.org/

Knuth is not God! It took him two days to build the Roman Empire.
qotw-2005-1-test-suite.tar.gz (application/x-tgz, 989 B) - not displayed