Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I just used a similar trick for a module I am going to release (hopefully) soon. To test it extensively I need a directory server handy, and a subtree in it to try a bunch of operations on it. Obviously I can't assume that the condition applies on every possible site the module will be installed in, so I put this code on the script headers:

use Test::More tests => 18 ; #18 my $fulltest = 18 ; my $shorttest = 2 ; BEGIN { use_ok('Net::LDAP::Simple') ; use_ok('Net::LDAP::Entry') ; } SKIP: { skip "doing local tests only",$fulltest-$shorttest unless $ENV{TEST_HOST} ; my $server = $ENV{TEST_HOST} || 'localhost' ; my $port = $ENV{TEST_PORT} || 389 ; my $base = $ENV{TEST_BASE} || 'ou=simple,o=test' ; my $binddn = $ENV{TEST_BINDDN} || 'cn=admin,o=test' ; my $bindpw = $ENV{TEST_BINDPW} || 'secret' ;

So, to run all the tests one should run them at least with something like TEST_HOST='server.ldap.my' make test

Ciao!
--bronto


The very nature of Perl to be like natural language--inconsistant and full of dwim and special cases--makes it impossible to know it all without simply memorizing the documentation (which is not complete or totally correct anyway).
--John M. Dlugosz

In reply to Re: Skip tests if/unless $ENV{FOO} is set using Test::More by bronto
in thread Skip tests if/unless $ENV{FOO} is set using Test::More by merlyn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others studying the Monastery: (6)
    As of 2025-02-07 07:47 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Which URL do you most often use to access this site?












      Results (94 votes). Check out past polls.