Re: [Rd] Package Unit Testing

From: Gregor Gorjanc <>
Date: Mon 24 Jul 2006 - 23:47:18 GMT

Martin Maechler <maechler <at>> writes:

> >>>>> "miguel" == miguel manese <jjonphl <at>>
> >>>>> 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 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?

I just tried to find relevant information and searched the whole Writing R Extensions manual on word test. I have find information Martin stated above, but failed to find how * should be created. I think that manual should say that. Did I miss something obvious? I am also not able to find Rdiff COMMAND in man page of R under Debian.

Browsing a bit in sources reveals that * is copy of R session (starts with "welcome" text and later one code and output is there). But how does one generate such a file? Additionally, does testing also test the first "welcome" text - different version of R haave a bit different "welcome" text and that should be an error then or ...


Gregor mailing list Received on Tue Jul 25 09:56:14 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 25 Jul 2006 - 10:34:30 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.