Testing NSPRNSPR provides an extensive set of test cases. Source for these tests are in the directory mozilla/nsprpub/pr/tests.
After building the test cases, individual tests can be run by changing directories to ...pr/tests/<BuildTarget>, where BuildTarget is the generated name for the build. Look for it; it should be obvious. From this directory you can run individual tests by name.
Not all tests are designed to run to completion, run without failing, or other good behavior. Some tests are malicious and are intended to provoke or demonstrate bugs in underlying operating systems or vendor provided libraries.
There is a set of tests believed to run consistently across all Netscape/AOL/iPlanet supported platforms. These tests can be run using the Korn Shell script: ...pr/tests/runtests.ksh. On Windows platforms, this script can be run using the MKS toolkit. You may have some success with this script using the Cygwin toolkit. We have not tested it.