Changeset 769

Show
Ignore:
Timestamp:
09/18/02 11:53:12
Author:
miyagawa
Message:

fixed test

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Template-Plugin-FillInForm/trunk/Changes

    r753 r769  
    11Revision history for Perl extension Template::Plugin::FillInForm 
     2 
     30.03  Wed Sep 18 11:51:44 JST 2002 
     4        - Fixed test suite not fail regardless of hash ordering 
     5          (Thanks to Randal L. Schwartz) 
    26 
    370.02  Sat Sep  7 16:47:02 JST 2002 
  • Template-Plugin-FillInForm/trunk/lib/Template/Plugin/FillInForm.pm

    r753 r769  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.02
     5$VERSION = 0.03
    66 
    77require Template::Plugin::Filter; 
  • Template-Plugin-FillInForm/trunk/t/01_fillin.t

    r605 r769  
    11use strict; 
    22use CGI; 
    3 use Template::Test; 
     3use Test::More tests => 6; 
     4use Template; 
    45 
    56my $query = CGI->new({ foo => 'bar', bar => 'baz' }); 
    6 test_expect(\*DATA, undef, { query => $query }); 
     7my $tt = Template->new; 
     8 
     9local $/ = ''; 
     10while (<DATA>) { 
     11    my($test, $expect) = /^--test--\n(.*?)\n--expect--\n(.*?)\n$/s; 
     12    my @expect = split /\n/, $expect; 
     13    $tt->process(\$test, { query => $query }, \my $out); 
     14    like $out, qr/$_/ for @expect; 
     15
    716 
    817__END__ 
     
    1322[%- END %] 
    1423--expect-- 
    15 <form action="foo" method="POST"><input name="foo" type="text" value="bar"></form> 
     24name="foo" 
     25type="text" 
     26value="bar" 
    1627 
    1728--test-- 
     
    2132[%- END %] 
    2233--expect-- 
    23 <form action="foo" method="POST"><input name="foo" type="text" value="foo&amp;"></form> 
     34name="foo" 
     35type="text" 
     36value="foo&amp;"