X-Git-Url: http://erislabs.net/gitweb/?p=liburi-template-perl.git;a=blobdiff_plain;f=t%2F20-deparse.t;fp=t%2F20-deparse.t;h=1a1934679b1b027e0ca143efc0402500433f7e8b;hp=4fac4b3d2b7640b8fd8cc2ca5a142d2c5e279d35;hb=917525490f5d8e583f4b53dcd2d792b9e6f42c88;hpb=6ce2a97438a9ca90e550caeefb1d3cecf259ded4 diff --git a/t/20-deparse.t b/t/20-deparse.t index 4fac4b3..1a19346 100644 --- a/t/20-deparse.t +++ b/t/20-deparse.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 13; use_ok( 'URI::Template' ); @@ -44,3 +44,11 @@ use_ok( 'URI::Template' ); my %result = $template->deparse( $uri ); is_deeply( \%result, \%input, 'process => deparse w/ multiple chars' ); } + +{ + my $template = URI::Template->new( 'http://ex.com/profile/{username}/address' ); + isa_ok( $template, 'URI::Template' ); + my $uri = 'http://ex.com/profile/Test/addresses'; + my %result = $template->deparse( $uri ); + is_deeply( \%result, { username => undef }, 'regex properly terminated' ); +}