dougm       01/09/12 09:40:27

  Added:       t/response/TestAPR table.pm
  Log:
  add tests for APR::Table
  Submitted by:  Philippe M . Chiasson <[EMAIL PROTECTED]>
  Reviewed by:  dougm
  
  Revision  Changes    Path
  1.1                  modperl-2.0/t/response/TestAPR/table.pm
  
  Index: table.pm
  ===================================================================
  package TestAPR::table;
  
  use strict;
  use warnings FATAL => 'all';
  
  use Apache::Test;
  
  use Apache::Const -compile => 'OK';
  use APR::Table ();
  
  sub handler {
      my $r = shift;
  
      plan $r, tests => 5;
  
      my $table = APR::Table::make($r->pool, 16);
  
      ok (UNIVERSAL::isa($table, 'APR::Table'));
  
      ok $table->set('foo','bar') || 1;
  
      ok $table->get('foo') eq 'bar';
  
      ok $table->unset('foo') || 1;
  
      ok not defined $table->get('foo');
  
      Apache::OK;
  }
  
  1;
  
  
  

Reply via email to