From Kurt.Hornik@ci.tuwien.ac.at  Sun Nov 18 18:36:06 2001
From: Kurt.Hornik@ci.tuwien.ac.at (Kurt Hornik)
Date: Sun, 18 Nov 2001 19:36:06 +0100
Subject: [Rd] Re: [R] sub directories in the tests directory of a package
In-Reply-To: <15348.65050.824365.207891@gargle.gargle.HOWL>
References: <15348.65050.824365.207891@gargle.gargle.HOWL>
Message-ID: <15351.65430.88813.407045@mithrandir.hornik.net>

>>>>> "David Kane writes:

> It seems like any directories (and their contents) beneath the /tests
> directory of an R package are not copied over completely when R CMD
> check is run. This causes problems (for me) when the tests for a
> function require some sort of directory structure. For example, I have
> an R function that iteratively searches through a directory tree for a
> specific file. Currently, I can not put the inputs for a test for that
> function in the /tests directory. It would seem that better behavior
> would be for R CMD check to simply (recursively) copy everything from
> the /tests directory in the package into the /tests directory in the
> .Rcheck directory, similar to the way that everything in /inst is
> copied over during INSTALL.

> Any suggestions? I poked around in the R CMD check code, but my Perl
> is even worse than my R. Or am I missing something?

Currently, it is assumed that tests has no subdirectories.  This has
been raised before, with the result that the Perl gurus were not sure
how to portably recursively copy a directory (apparently, Perl/CPAN has
rmtree, but no cptree?).

I think if you simply want to find a file in a dir tree, you could have
your test code create the tree first.

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Re: [R] sub directories in the tests directory of a package
Kurt Hornik