[Israel.pm] Keeping Track of the Number of Tests in a Test File (using vim)

Shlomi Fish shlomif at iglu.org.il
Thu Dec 2 07:49:20 PST 2004


Hi all!

I wrote the following vim script:

http://www.vim.org/scripts/script.php?script_id=1148

to keep track of the number of checks I perform in a Perl test file (t/*.t). 
What you do is add comments like "# TEST" or "# TEST*3*5", and the script 
counts the tests and replaces it in the "use Test::More tests => $count" 
line. Of course you should remember to add "# TEST" lines for every test you 
perform, but it's easier than updating it by hand whenever you add or remove 
a test.

Regards,

	Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

Knuth is not God! It took him two days to build the Roman Empire.



More information about the Perl mailing list