Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Simulate eq_or_diff() with is() because the core doesn't have Test::D…
…ifferences.

But its so darn useful for these big blocks of text.
  • Loading branch information
schwern committed Apr 20, 2010
1 parent 367da98 commit e007eb8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion t/corelist-format.t
Expand Up @@ -7,9 +7,19 @@
use strict;
use warnings;

use Test::Differences;
use Test::More 'no_plan';

# The core doesn't have Test::Differences, but its really handy
# so emulate it with is() if its not available.
BEGIN {
if( eval { require Test::Differences } ) {
*eq_or_diff = \&Test::Differences::eq_or_diff;
}
else {
*eq_or_diff = \&is;
}
}

# corelist -a
eq_or_diff scalar `$^X -Ilib ./corelist -a Test::Harness`, <<'END', "corelist -a";
Expand Down

0 comments on commit e007eb8

Please sign in to comment.