stas        2003/05/27 19:01:28

  Modified:    src/docs/general/testing testing.pod
  Log:
  document new shortcuts: have_min_perl_version,
  have_min_module_version
  
  Revision  Changes    Path
  1.21      +31 -1     modperl-docs/src/docs/general/testing/testing.pod
  
  Index: testing.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/general/testing/testing.pod,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- testing.pod       24 Apr 2003 02:48:34 -0000      1.20
  +++ testing.pod       28 May 2003 02:01:28 -0000      1.21
  @@ -1847,6 +1847,13 @@
   
     plan tests => 5, 0;
   
  +But this won't hint the reason for skipping therefore it's better to
  +use C<have()>:
  +
  +  plan tests => 5,
  +      have 'LWP', 
  +           { "not Win32" => sub { $^O eq 'MSWin32'} };
  +
   =item * an C<ARRAY> reference
   
   have_module() is called for each value in this array. The test is
  @@ -1883,7 +1890,20 @@
   will skip the whole test unless both Perl modules C<Chatbot::Eliza>
   and C<CGI> and the C module I<mod_proxy.c> are available.
   
  -=item * have
  +=item have_min_module_version()
  +
  +Used to require a minimum version of a module
  +
  +For example:
  +
  +  plan tests => 5, have_min_module_version(CGI => 2.81);
  +
  +requires C<CGI.pm> version 2.81 or higher.
  +
  +Currently works only for perl modules.
  +
  +
  +=item * have()
   
   have() called as a last argument of plan() can impose multiple
   requirements at once.
  @@ -1929,6 +1949,16 @@
     plan tests => 5, have_perl 'iolayers';
   
   tests whether C<PerlIO> is available.
  +
  +=item have_min_perl_version()
  +
  +Used to require a minimum version of Perl.
  +
  +For example:
  +
  +  plan tests => 5, have_min_perl_version("5.008001");
  +
  +requires Perl 5.8.1 or higher.
   
   =item * have_threads()
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to