use strict; use warnings; use t::std; { check_test( sub { cmp_deeply("a", "a", "scalar eq"); }, { name => "scalar eq", actual_ok => 1, diag => "", } ); check_test( sub { cmp_deeply("a", "b", "scalar not eq"); }, { name => "scalar not eq", actual_ok => 0, diag => < "def undef", actual_ok => 0, diag => < "undef def", actual_ok => 0, diag => < "undef undef", actual_ok => 1, diag => '', } ); check_test( sub { cmp_deeply("", undef); }, { actual_ok => 0, diag => < "ref ref eq", actual_ok => 1, diag => "", } ); check_test( sub { cmp_deeply(\\"a", \\"b", "ref ref not eq"); }, { name => "ref ref not eq", actual_ok => 0, diag => < 1, diag => "", }, "equal refs" ); } { my @a; check_test( sub { cmp_deeply(undef, \@a); }, { actual_ok => 0, }, "not calling StrVal on undef" ); }