From maechler at stat.math.ethz.ch  Mon Jul  3 09:13:46 2006
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Mon, 3 Jul 2006 09:13:46 +0200
Subject: [Rd] Package Unit Testing
In-Reply-To: <d35b9da60607021843j5ec840e5j3b69bde225bfa195@mail.gmail.com>
References: <d35b9da60607021843j5ec840e5j3b69bde225bfa195@mail.gmail.com>
Message-ID: <17576.50090.402802.304218@stat.math.ethz.ch>

>>>>> "miguel" == miguel manese <jjonphl at gmail.com>
>>>>>     on Mon, 3 Jul 2006 09:43:12 +0800 writes:

    miguel> Hello, Do we have like an official unit testing
    miguel> framework for packages? Like we do R CMD check, and
    miguel> say the scripts in <pkg>/test are executed? 

yes.  Just it's  "./tests",  not './test'.

More specifically, all ./tests/*.R are executed and for those
foobar.R for which there's a  foobar.Rout.save  file,
the output is (R CMD Rdiff)ed agains the result of running foobar.R

All this should be pretty obvious from the manual
"Writing R Extensions".  
What was it in there that was not clear enough?

    miguel> Or do we roll out our own outside the package?

Some people use the 'RUnit' package in addition or -- unfortunately --
alternatively to the "official" testing procedures via the
"./tests" directory.

Martin Maechler, ETH Zurich



[Rd] Package Unit Testing
Martin Maechler