how many times can you spot the letter "p" in:
the macports testing framework uses tcltest for its unit tests as well as regression tests. the framework was developed during google summer of code 2013 by marius coțofană (marius@).
to keep things simple, each module of macports ( macports1.0, package1.0, port1.0, registry2.0 ) has its own tests/ directory. each tcl script in a module (e.g. macports.tcl) has its own test script located in the tests directory, with the same name and the '.test' extension (e.g. macports.test). every proc in a script (e.g. proc macports::findbinary) should have its own test proc (e.g. test findbinary) in the corresponding test file. test procs should maintain the order in the original script and should be independent of one another.
tests can be run only on an installed version of macports (so make sure you have run sudo make install).
the easiest way to run all the tests, is to use the target in the makefile.
the stack trace of an error that occurs during a test is printed below the constraints (if any).
specific test cases can be run using the '-match' argument for the file that contains the test, from its parent directory.
regression tests can be found in tests/test/ and can be run just as unit tests, using make test from the parent directory.
puts $fd "portdbpath $pwd/tmpdir/var/macports"
puts $fd "prefix $pwd/tmpdir"
puts $fd "variants_conf $pwd/tmpdir/variants.conf"
puts $fd "sources_conf $pwd/sources.conf"
puts $fd "applications_dir $pwd/tmpdir/applications"
puts $fd "frameworks_dir $pwd/tmpdir/library/frameworks"
mport close unit test.
return "fail: cannot run mportclose"
return "mport close successful."
} -result "mport close successful."
in all tests we use this portfile.
this is the test.tcl file used to run and parse the output of all the tests in a module.
a worker_init copy, without using sub-interpreters library.tcl.
example of sources.conf.
an example of a test file macports.test.
a library.tcl of useful procs in regression testing.

user
The total number of "p"s in that passage is sixty-four.
assistant