[R] Package testing

From: Gábor Csárdi <csardi_at_rmki.kfki.hu>
Date: Tue, 15 Jun 2010 15:39:34 +0200


Dear all,

I would like to write some tests for my R package, and the usual
'tests' directory seemed like a good solution, but there is something
I cannot understand.

It is possible to supply .Rout.save files with the expected output for the tests, which is great. But since the tests are not run with R --slave, the expected output needs to contain all the extra output from R, e.g. the startup message. The commands are echoed to the output, too.

This makes it difficult to write proper tests, as they will necessarily fail on all but one R versions (the version number is always part of the output), and one would need to write the test programs twice, once in the normal .R file, and once in the .Rout.save file.

Is there a way to work around these things? Or am I trying to use the
'tests' directory for something that was not intended?

Best Regards,
Gabor

-- 
Gabor Csardi <Gabor.Csardi_at_unil.ch>     UNIL DGM

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 15 Jun 2010 - 13:41:19 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Jun 2010 - 17:40:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive