Skip to content
Prev 6899 / 12125 Next

[R-pkg-devel] Get WARNING in R CMD check from warning in test code?

I had been under the mistaken impression that warnings in test code 
would lead to NOTEs or WARNINGs in R CMD check, but they are ignored.

I think the only outcomes from running test code are OK or ERROR, the 
latter happening when R exits with a non-zero status, as it does by 
default when there's a call to stop() in the test code.

Am I wrong about this?  Is there a way to put something executable in 
the test script that will generate a WARNING in R CMD check when executed?

The closest I can seem to get is to include *.Rout.save, which generates 
a NOTE if it doesn't match, and is fairly inconvenient to keep up to date.

Duncan Murdoch