On Thu, Dec 18, 2003 at 01:28:57PM -0800, Randal L. Schwartz wrote:
> In my recently released File::Finder module, I have the basic
> tests to ensure that the find options are grabbed correctly,
> and that the core and/or/not/parens logic is clean, along with
> the easy test to ensure that eval() works.
> 
> However, to test the file operations, like "files named moe", I have
> to test a live file tree.  Or do I?
> 
> I was hoping to leverage off the tests for find2perl, because that's
> exactly what I'd be testing as well.  Alas, none.  The tests for File::Find
> are rather simple, because there it's more about the mechanism and
> the odd cases (like symlinks) than about individual file properties.
> 
> Should my test come with a tar file that gets extracted?  Should I
> build a small tree on the fly?

If you're not planning on your tests modifying the test tree at all,
you can probably just get away with having t/tree/... as a bunch of
normal files and directorys in the tarball.  Don't ship a seperate
tar file, that introduces unnecessary dependencies.

If you plan on making changes to the tree you'll need some way to 
setup/teardown the tree between test runs to ensure its clean.
In that case a tarball or small perl script would be best.


-- 
Michael G Schwern        [EMAIL PROTECTED]  http://www.pobox.com/~schwern/
I've just gone through a lung-crushing breakup with my blender and I don't 
think I should screw my forehead alone tonight.

Reply via email to