Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • What I usually recommend people to do, particularly if the test suite gets large, is to name tests after their packages. For SQL::Statement [cpan.org], you would get something like this:

    t/sql/dialects/ansi.t
    t/sql/dialects/anydata.t
    t/sql/dialects/csv.t
    t/sql/eva l.t
    t/sql/parser.t
    t/sql/statement.t
    t/sql/statement/function.t
    t/sql/statem ent/functions.t
    t/sql/statement/getinfo.t
    t/sql/statement/operation.t
    t/sql/s tatement/placeholder.t
    t/sql/statement/ram.t
    t/sql/statement/term.t
    t/sql/sta tement/termfactory.t
    t/sql/stateme

  • Realistically most test dependencies really want to express two things: Run this first and run this last. For that you have 00foo.t and 99bar.t. 00compile.t, 00setup.t, 99teardown.t, 99pod.t, etc... Anything else, just write it without the number.

    Wouldn't that make a test file starting with an alphabetic character run after the 99-prefixed files?

  • I don't necessarily use consecutive numbers, instead, I use three-digit numbers, with the first digit indicating a "category".

    This is from one distribution of mine.

    001_compile.t
    100_machine.t
    102_misc.t
    103_wix_component.t
    104_wix_fragment.t
    111_environment.t
    112_files_entry.t
    113_files_component.t
    114_files_directoryref.t
    115_startmenu.t
    116_registry.t
    117_directorytree.t
    118_icons.t
    119_createfolder.t
    120_feature.t
    121_files.t
    122_removefolder.t
    500_new.t
    800_perlcritic.t
    801_pod.t
    802_pod_coverage.t
    8

    --
    The new Strawberry Perl for Windows has been released! Check http://strawberryperl.com for it.