Changeset 88 in text-formbuilder for trunk/t


Ignore:
Timestamp:
06/29/05 16:46:56 (19 years ago)
Author:
peichman
Message:

BUGFIX: stopped crosstalk of data from one object to another (references were getting shared in the parser grammar code)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/Text-FormBuilder.t

    r87 r88  
    44######################### 
    55 
    6 # change 'tests => 1' to 'tests => last_test_to_print'; 
    7  
    8 use Test::More tests => 10; 
     6use Test::More qw(no_plan); #tests => 11; 
    97BEGIN { use_ok('Text::FormBuilder'); }; 
    10  
    11 ######################### 
    12  
    13 # Insert your test code below, the Test::More module is use()ed here so read 
    14 # its man page ( perldoc Test::More ) for help writing this test script. 
    158 
    169my $p = Text::FormBuilder->new; 
     
    3932is(keys %{ $form->fields }, 3, 'correct number of fields'); 
    4033 
    41 my $p2 = Text::FormBuilder->parse_array([qw(code title semester instructor)]); 
    42 is(keys %{ $p2->form->fields }, 4, 'correct number of fields from parse_array'); 
    43 #$p2->write; 
     34# create some additional parsers, to make sure we aren't sharing data 
     35my $p2 = Text::FormBuilder->parse_text($simple); 
     36is(keys %{ $p2->form->fields }, 3, 'correct number of fields from parse_text'); 
     37 
     38my $p3 = Text::FormBuilder->parse_array(qw(code title semester instructor)); 
     39is(keys %{ $p3->form->fields }, 4, 'correct number of fields from parse_array'); 
Note: See TracChangeset for help on using the changeset viewer.