water has asked for the wisdom of the Perl Monks concerning the following question:

Is there a way to tell Test::Harness to print a report relative to a certain directory, so the failing test isn't truncated if the full filename is long?

Here's my failure output:

Failed Test Stat Wstat Total Fail Failed List +of Failed ---------------------------------------------------------- /home/foo/sandbox/PerlCode/lib/T 5 1280 10 5 50.00% 1-2 4 +7-8 /home/foo/sandbox/PerlCode/lib/T 2 512 2695 2 0.07% 2573 2 +636 /home/foo/sandbox/PerlCode/lib/T 28 7168 206 28 13.59% 123-13 +4 180 /home/foo/sandbox/PerlCode/lib/T 1 256 76 1 1.32% 47 4 tests skipped. Failed xxx test scripts, 96.15% okay. xxx subtests failed, 99.29% okay +.
Note the truncation -- the tests are not called "home/foo/sandbox/PerlCode/lib/T"... that's just how they start.

Thanks for advice

water

UPDATE

handled with an alias:

alias proveall='pushd . && cd ~/sandbox/PerlCode/lib && prove -r -s . +&& popd'
cool

Replies are listed 'Best First'.
Re: Test::Harness long filenames
by tachyon (Chancellor) on Aug 08, 2004 at 13:42 UTC

    Setting $ENV{HARNESS_NOTTY} would also do the trick, but as if often the case, symlinks are your friend.....

    cheers

    tachyon

Re: Test::Harness long filenames
by Anonymous Monk on Aug 08, 2004 at 14:30 UTC
    UPDATE

    handled with an alias:

    A better idea would be to file a bug report (and optionally a patch ) on rt.cpan.org.
Re: Test::Harness long filenames
by pbeckingham (Parson) on Aug 09, 2004 at 02:50 UTC

    It only reports file names if you first chdir to the test directory.



    pbeckingham - typist, perishable vertebrate.