X-Git-Url: http://erislabs.net/gitweb/?p=liburi-template-perl.git;a=blobdiff_plain;f=t%2F20-deparse.t;h=4fac4b3d2b7640b8fd8cc2ca5a142d2c5e279d35;hp=acb753ef0344b5d52ea796a73f6a1d3b90145df6;hb=6ce2a97438a9ca90e550caeefb1d3cecf259ded4;hpb=4e234fc969ae1ec9d66e909a05fa0387bfafb331 diff --git a/t/20-deparse.t b/t/20-deparse.t index acb753e..4fac4b3 100644 --- a/t/20-deparse.t +++ b/t/20-deparse.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 11; use_ok( 'URI::Template' ); @@ -34,3 +34,13 @@ use_ok( 'URI::Template' ); my %result = $template->deparse( $uri ); is_deeply( \%result, \%input, 'process => deparse' ); } + +{ + my $template = URI::Template->new( 'http://ex.com/{test}' ); + isa_ok( $template, 'URI::Template' ); + my %input = ( test => 'test' ); + my $uri = $template->process( test => 'test' ); + is( $uri, 'http://ex.com/test' ); + my %result = $template->deparse( $uri ); + is_deeply( \%result, \%input, 'process => deparse w/ multiple chars' ); +}