--- CBOR-XS/t/52_object.t 2013/11/28 11:37:23 1.6 +++ CBOR-XS/t/52_object.t 2013/11/30 17:19:34 1.7 @@ -1,4 +1,4 @@ -BEGIN { $| = 1; print "1..20\n"; } +BEGIN { $| = 1; print "1..21\n"; } BEGIN { $^W = 0 } # hate use CBOR::XS; @@ -46,5 +46,12 @@ $dec = decode_cbor $enc; print $dec eq 777 ? "" : "not ", "ok 19\n"; -print "ok 20\n"; +sub CBOR::XS::freeze2::FREEZE { + 77 +} + +my $enc = CBOR::XS->new->allow_sharing->encode ([(bless [], CBOR::XS::freeze2::) x 3]); +print $enc eq (pack "H*", "83d81cd81a825143424f523a3a58533a3a667265657a6532184dd81d00d81d00") ? "" : "not ", "ok 20 ", (unpack "H*", $enc), "\n"; + +print "ok 21\n";