Put newbie info about lua tests here.
Please write your observations about not obvious things when playing with lua tests.
How to run lua tests
One must build
make tester # on unix
NOTE if you invoke
make tester on mingw make will try to build tester using implicit make rules and will fail miserably. That's the reason for giving .exe suffix.
To run the tests invoke following command:
./tester ./tester lua-testsuite.lua [tests ...]
Testsuite invoked without any test names invoke all tests.
How to build lua tests
This is basic unittesting stuff. Interesting functions:
||fails when condition is not met|
||returns true if pattern is found in given file|
||idiom: invoke monotone with given args, check return status and possibly remember its standard and diagnostic output|
||read contents of file and return string|
||idiom for writefile(name, contents) , mtn add name|