in reply to Whitespace issues in testing

I agree with dragonchild that this is very domain specific.

Moreover, I wonder whether there's really a sufficiently general test-module here given all the combinations. In most cases, I suspect that a short user function at the top of the test file or in a fixture file would be clear and avoid adding an extra dependency.

Alternatively, instead of writing a new module, how about adding these as options to Test::Differences? Or perhaps adding a generalized callback to filter input before making the comparison?

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Replies are listed 'Best First'.
Re^2: Whitespace issues in testing
by Ovid (Cardinal) on Feb 28, 2006 at 08:30 UTC

    Ooh, the callback filter is a great idea. I think I should write up a patch and submit it. That's much better. Thanks!

    Cheers,
    Ovid

    New address of my CGI Course.

Re^2: Whitespace issues in testing
by philcrow (Priest) on Feb 28, 2006 at 14:15 UTC
    I too vote for the callback filters. I put these into Test::Files. If you use the feature, your filter gets every line right before Algorithm::Diff sees it. It works great. I originally needed it to strip dates out of the machine generated files, since the files were made at different times and I only cared about the content not the time difference.

    Phil