Created
June 22, 2012 08:12
-
-
Save xaicron/2971253 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $got_str = _dd($got)."\n"; | |
my $expects_str = _dd($expects)."\n"; | |
if (length $got_str > 10000 && length $expects_str > 10000) { | |
require Test::Differences; | |
Test::Differences::eq_or_diff($got, $expects); | |
return; | |
} | |
ok $got_str eq $expects_str, $desc or do { | |
note String::Diff::diff($got_str, $expects_str, ( | |
remove_open => color('black on_red'), | |
remove_close => color('reset'), | |
append_open => color('black on_green'), | |
append_close => color('reset'), | |
)); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment