| 
                Last change
                  on this file since 34 was
                  19,
                  checked in by peter, 21 years ago
           | 
        
        
          | 
               
more documentation 
added automagic parse method; moved old parse($file) method to parse_file 
 
           | 
        
        | 
            File size:
            1.0 KB
           | 
      
      
        
  | Rev | Line |   | 
|---|
| [1] | 1 | # Before `make install' is performed this script should be runnable with | 
|---|
 | 2 | # `make test'. After `make install' it should work as `perl Text-FormBuilder.t' | 
|---|
 | 3 |  | 
|---|
 | 4 | ######################### | 
|---|
 | 5 |  | 
|---|
 | 6 | # change 'tests => 1' to 'tests => last_test_to_print'; | 
|---|
 | 7 |  | 
|---|
| [19] | 8 | use Test::More tests => 6; | 
|---|
| [9] | 9 | BEGIN { use_ok('Text::FormBuilder'); }; | 
|---|
 | 10 |  | 
|---|
| [1] | 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. | 
|---|
 | 15 |  | 
|---|
| [9] | 16 | my $p = Text::FormBuilder->new; | 
|---|
 | 17 | isa_ok($p, 'Text::FormBuilder', 'new parser'); | 
|---|
| [19] | 18 | isa_ok($p->parse_text('')->build->form, 'CGI::FormBuilder',  'generated CGI::FormBuilder object (build->form)'); | 
|---|
 | 19 | isa_ok($p->parse_text('')->form,        'CGI::FormBuilder',  'generated CGI::FormBuilder object (form)'); | 
|---|
| [9] | 20 |  | 
|---|
| [19] | 21 | $p = Text::FormBuilder->parse_text(''); | 
|---|
 | 22 | isa_ok($p, 'Text::FormBuilder', 'new parser (from parse_text as class method)'); | 
|---|
 | 23 |  | 
|---|
 | 24 | $p = Text::FormBuilder->parse(\''); | 
|---|
 | 25 | isa_ok($p, 'Text::FormBuilder', 'new parser (from parse as class method)'); | 
|---|
 | 26 |  | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.