From: Peter Rabbitson Date: Mon, 4 May 2009 07:16:00 +0000 (+0000) Subject: Better debug output X-Git-Tag: v0.11008~163^2~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ce6c267afbbb1112794086b2b1d286a4a24597a0;p=dbsrgits%2FSQL-Translator.git Better debug output --- diff --git a/t/60roundtrip.t b/t/60roundtrip.t index cc5595f..98652df 100644 --- a/t/60roundtrip.t +++ b/t/60roundtrip.t @@ -4,6 +4,7 @@ use warnings; use strict; use Test::More qw/no_plan/; use Test::Exception; +use Test::Differences; use FindBin qw/$Bin/; use SQL::Translator; @@ -175,13 +176,9 @@ sub check_roundtrip { # the two sql strings should be identical my $msg = "$args->{name} SQL roundtrip successful - SQL statements match"; - $ENV{SQLTTEST_RT_DEBUG} - ? is_deeply ( - [ split /\n/, $rt_out ], - [ split /\n/, $base_out ], - $msg, - ) - : ok ($rt_out eq $base_out, $msg) + $ENV{SQLTTEST_RT_DEBUG} #stringify below because IO::Scalar does not behave nice + ? eq_or_diff ("$rt_out", "$base_out", $msg) + : ok ("$rt_out" eq "$base_out", $msg) ; }