X-Git-Url: http://erislabs.net/gitweb/?p=liburi-template-perl.git;a=blobdiff_plain;f=t%2F11-ordered.t;fp=t%2F11-ordered.t;h=0000000000000000000000000000000000000000;hp=c96a184c336e8f01e3e951025d81ac2b2df05289;hb=c4fd5064ccd0e0c568bec68ebe82f3daf6c235b6;hpb=917525490f5d8e583f4b53dcd2d792b9e6f42c88 diff --git a/t/11-ordered.t b/t/11-ordered.t deleted file mode 100644 index c96a184..0000000 --- a/t/11-ordered.t +++ /dev/null @@ -1,42 +0,0 @@ -use strict; -use warnings; - -use Test::More tests => 9; - -use_ok( 'URI::Template' ); - -{ - my $text = 'http://foo.com/{arg2}/{arg1}'; - my $template = URI::Template->new( $text ); - isa_ok( $template, 'URI::Template' ); - is_deeply( - [ $template->all_variables ], - [ qw( arg2 arg1 ) ], - 'all_variables()' - ); - - { - my $result = $template->process( [ qw( x y ) ] ); - is( $result, 'http://foo.com/x/y', 'process(\@args)' ); - isa_ok( $result, 'URI', 'return value from process() isa URI' ); - } - - { - my $result = $template->process_to_string( [ qw( x y ) ] ); - is( $result, 'http://foo.com/x/y', 'process_to_string(\@args)' ); - ok( !ref $result, 'result is not a ref' ); - } - - # test for 0 as value - { - my $result = $template->process_to_string( [ qw( 0 0 ) ] ); - is( $result, 'http://foo.com/0/0', 'process w/ 0' ); - } - - # test with no values - { - my $result = $template->process_to_string( [] ); - is( $result, 'http://foo.com//', 'process w/ no values' ); - } -} -