Skip to content

Instantly share code, notes, and snippets.

@xaicron
Created June 22, 2012 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xaicron/2971253 to your computer and use it in GitHub Desktop.
Save xaicron/2971253 to your computer and use it in GitHub Desktop.
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