On Thu, 9 Jan 2003, [iso-8859-1] Murat �nalan wrote: >>>I wanted to suggest to use MANIFEST order of *.t files (appendix), >>>instead of random.
>>They're not random, they're alphabetically sorted by filename. > >Oh yes. But this, IMHO, isn't a good solution. I see all this nice >people writing CPAN modules and tests, and are unhappy because they >have to rename their *.t files. And rename it. And rename it, >because they are so lazy and stupid like me. Example > > 01_setup.t.......ok > 02_install.t.....ok > 03_work.t........ok > 04_teardown.t....ok I thought the point of the .t files was that each was self-contained and had its own setup and teardown. But I guess this is not a hard and fast rule. >Fifth thought: "Hmm, i have an idea. Just rename >02_install.t, 03_work.t and 04_teardown.t to" > >01_setup.t >03_install.t >04_work.t >05_teardown.t > >and place 02_postsetup.t into t. If you really do need a particular ordering among your test cases, you could have two digits at the front of the filenames a la SysV init scripts. But I think you are probably in the minority, don't most modules have self-contained tests? Maybe someone more knowledgeable will contradict me. Hang on a minute - if this 01_setup.t test fails, surely every following test will fail too? If you want to run 02_foo.t then you must run 01_setup.t first. What is the point of having them as separate test files, why not have a single test which runs all these stages? If you like to have separate reports on each stage you can of course use the 'ok 1', 'not ok 2' output of the test program. >So a new option in Makefile.PL like "MANIFEST_ORDERED_TESTS" => 1, If you want a particular ordering why not write a small Perl program to call the files in the right order and make that the test case that is run from 'make test'? -- Ed Avis <[EMAIL PROTECTED]>
