From h.wickham at gmail.com  Sun May  4 15:13:28 2008
From: h.wickham at gmail.com (hadley wickham)
Date: Sun, 4 May 2008 08:13:28 -0500
Subject: [Rd] R CMD check: small tests suggestion
In-Reply-To: <alpine.LFD.1.10.0805040555260.15533@gannet.stats.ox.ac.uk>
References: <f8e6ff050805031814n300e2ab1n4a7a70a4fadc669e@mail.gmail.com>
	<alpine.LFD.1.10.0805040555260.15533@gannet.stats.ox.ac.uk>
Message-ID: <f8e6ff050805040613p7c1ade87g1e62d5ca7f2920bd@mail.gmail.com>

> > It would be nice if R CMD check ran any file in the tests directory
> > that has "one of the extensions .R, .S, .q, .r, or .s" - i.e. it
> > should match the files processed in the R directory.
> >
>
>  Whereas what it is documented in 'Writing R Extensions' is to use .R or
> .Rin files.  This leaves the other extensions available for other purposes
> -- the difference is that there should be no other files in the R directory,
> but often will be in the tests directory.
>
>  I have some sympathy for .r (which we allow for demos) given the prevalence
> of case-insensitive file systems, but why would it be 'nice' to have the
> others?  And what would the output file be called?  Should .S be processed
> to .Sout and matched to a .Sout.save file?  This would seem to introduce
> more confusion that it might remove.

Those are good points - .r is the extension that I really want as it
would have saved me much frustration trying to figure out why my tests
weren't running.  An alternative would be to report

* checking tests ...
  No test files found

rather than

* checking tests ...
  OK

in the case in which there are no files run in the tests directory.

Hadley


-- 
http://had.co.nz/



[Rd] R CMD check: small tests suggestion
hadley wickham