CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Multiple Test Files with Multiple Tests



May 5, 2013, 3:51 PM

Post #1 of 1 (814 views)
Multiple Test Files with Multiple Tests Can't Post


I've been out of the Perl universe for a while (working C the past 8 months) but I think I have a lulu of a question for a new project I'm doing on my own time.

It's unlikely that anyone recalls this but I've been using Sam Tregars's book Writing Perl Modules for CPAN as my guide. But there's always a detail I miss in there.

In the discussion about .t test scripts in the module/t subdirectory: It leaves me with the impression that there should be one test per .t file. On the other hand, looking at POD pages from Test::Tutorial, Test::Simple and Test::More, the discussion there is all about many tests in one file. For my little project, I felt I should put my 5 or so constructor tests in one file and all the tests for each overloaded operator (eg. + and +=) in one file each, but there would be multiple tests in each .t file.

Before if I go about committing myself to that kind of scheme, I'd like to have an idea *before* I try to install it with a "make test", what to expect. Will the test numbers restart from 1 every time? Or will the "make test" get confused by the multiple files with multiple tests?

As has been the case before, I cannot think of a way of phrasing this question to get meaningful results.

I'm leaning toward trying it with two test files to try it out but it would help if someone has already tried it with positive results.

Thanks much!
-- Rasputin Paskudniak (In perpetual pursuit of undomesticated, semi-aquatic avians)


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives