[darcs-devel] notes on the tla test suite

Mark Stosberg mark at summersault.com
Sat Oct 23 09:05:16 PDT 2004


I was curious today and took a look at the tla test suite.
Their tests are completely in shell script, but have an an interesting
difference from the darcs tests

They use a home-grown shell-based testing framework for all their tests. 

You can see an example test here:
http://archzoom.sourcecontrol.net/demo/jblack@gnuarch.org--2004/tla--release--1.2.2--base-0/tests/test-inventory.sh

And the framework here:
http://archzoom.sourcecontrol.net/demo/jblack@gnuarch.org--2004/tla--release--1.2.2--base-0/tests/test-framework

The test framework provides:
 - set up and teardown of test archives
 - ability to have named and numbered tests
 - ability to usefully have multiple tests per script.
 - Some diagnostics 

(The last three are already built into Perl's Test::More framework). 

It's partly interesting to note that darcs has less of a need of this,
because it's easier to set up a new archive. :) 

Still, for those who prefer to write tests in shell script, I think
having a little framework like this for darcs could make some kinds of
test writing even easier.  

	Mark

-- 
http://mark.stosberg.com/ 





More information about the darcs-devel mailing list