From cc7e65cafe5b423e72f5939947d3989aaeeaefcd Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Mon, 14 Nov 2011 15:06:47 +0000 Subject: fix tags&ranges ser bug (w/ test) --- t/json.t | 3 +++ 1 file changed, 3 insertions(+) (limited to 't') diff --git a/t/json.t b/t/json.t index 5e00080..d1162b3 100644 --- a/t/json.t +++ b/t/json.t @@ -43,10 +43,12 @@ use Data::Printer; use JSON::XS; my $opts={tag=>'something'}; +my $ropts={tag=>'something',from=>10,to=>20}; my $json = JSON::XS->new->utf8; my $obj = Foo->new(rr=>'foo'); $obj->tt_multi($opts,1234); +$obj->ttrr_multi($ropts,777); my $hash = $obj->as_hash; note p $hash; my $str = $json->encode($hash); @@ -60,6 +62,7 @@ note p $obj2; is($obj2->tt,$obj->tt,'tt'); is($obj2->tt_multi($opts),$obj->tt_multi($opts),'tt tagged'); +is($obj2->ttrr_multi({at => 15}),$obj->ttrr_multi({at => 15}),'ttrr'); is($obj2->rr,$obj->rr,'rr'); done_testing; -- cgit v1.2.3