Newer
Older
NetAddr-IP / Lite / Util / t / mode.t
@Michael Robinton Michael Robinton on 21 Oct 2014 759 bytes Import of MIKER/NetAddr-IP-4.018 from CPAN.
  1. # Before `make install' is performed this script should be runnable with
  2. # `make test'. After `make install' it should work as `perl test.pl'
  3.  
  4. ######################### We start with some black magic to print on failure.
  5. # Change 1..1 below to 1..last_test_to_print .
  6. # (It may become useful if the test is moved to ./t subdirectory.)
  7.  
  8. BEGIN { $| = 1; print "1..2\n"; }
  9. END {print "not ok 1\n" unless $loaded;}
  10.  
  11. use NetAddr::IP::Util qw(
  12. mode
  13. );
  14.  
  15. $loaded = 1;
  16. print "ok 1\n";
  17. ######################### End of black magic.
  18.  
  19. # Insert your test code below (better if it prints "ok 13"
  20. # (correspondingly "not ok 13") depending on the success of chunk 13
  21. # of the test code):
  22.  
  23. my $mode = mode();
  24. my $txt = "\tmode $mode";
  25. print STDERR $txt,"\n";
  26. print "ok 2\n";