On Tue, Feb 11, 2014 at 10:17 AM, shawn wilson <ag4ve...@gmail.com> wrote:
> Is there a way to see the data difference when is_deeply fails?

So, with this code:

#! perl

use Test::More;

my $a = { foo => {bar => { baz => 'bargle' }}};
my $b = { foo => {baz => { bar => 'bargle' }}};

is_deeply( $a , $b );

done_testing;

I get this output:

% prove deeply.t
deeply.t .. 1/?
#   Failed test at deeply.t line 8.
#     Structures begin differing at:
#          $got->{foo}{baz} = Does not exist
#     $expected->{foo}{baz} = HASH(0x7fdb798283f0)
# Looks like you failed 1 test of 1.
deeply.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests

Test Summary Report
-------------------
deeply.t (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=1, Tests=1,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.02 cusr
0.00 csys =  0.06 CPU)
Result: FAIL

What do you get?

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to