I've written a Test::Differences[1] that outputs things like:

    not ok 5
    # Failed test 5 in blib/lib/Test/Differences.pm at line 221 fail #4 *TODO*
    # +-----+----------+
    # | Got | Expected |
    # +-----+----------+
    # | a\n | a\n      |
    # >xxxxx* b\n      <
    # | c\n | c\n      |
    # >xxxxx* d\n      <
    # | e\n | e\n      |
    # +-----+----------+

when passed strings, arrays of strings, arrays of hashes, or arrays of
arrays of strings (basically, all the result types DBI's fetchall_...()
methods can return plus whole strings).

I would like to make Test::Differences autodetect Test::More and others
like it so it can extend them "seamlessly" like so:

    use Test::More ;
    use Test::Differences ;

    plan tests => 10 ;

    is "a", "a" ;
    is_or_diff \@Got1, \@Expected1, "test 2" ;
    TODO: {
        local $TODO = $why_oh_why ;
        is_or_diff \@Got2, \@Expected2, "test 3" ;
    }
 
Feedback on the module itself is welcome, but I also want to know what
the preferred way to mix in to Test::Straps supported environments is,
and if there's an equivalent way to "mix in" with Test.pm.  I'm
currently doing it as a hack just to to make it "work", but it needs to
be better integrated.

- Barrie

[1] See http://slaysys.com:81/src/Test-Differences-0.1.tar.gz

Reply via email to