home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl560.zip / t / lib / gol-basic.t < prev    next >
Text File  |  1999-09-09  |  706b  |  25 lines

  1. #!./perl -w
  2.  
  3. BEGIN {
  4.     chdir 't' if -d 't';
  5.     unshift @INC, '../lib';
  6. }
  7.  
  8. use Getopt::Long 2.17;
  9.  
  10. print "1..9\n";
  11.  
  12. @ARGV = qw(-Foo -baR --foo bar);
  13. Getopt::Long::Configure ("no_ignore_case");
  14. undef $opt_baR;
  15. undef $opt_bar;
  16. print "ok 1\n" if GetOptions ("foo", "Foo=s");
  17. print ((defined $opt_foo)   ? "" : "not ", "ok 2\n");
  18. print (($opt_foo == 1)      ? "" : "not ", "ok 3\n");
  19. print ((defined $opt_Foo)   ? "" : "not ", "ok 4\n");
  20. print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n");
  21. print ((@ARGV == 1)         ? "" : "not ", "ok 6\n");
  22. print (($ARGV[0] eq "bar")  ? "" : "not ", "ok 7\n");
  23. print (!(defined $opt_baR)  ? "" : "not ", "ok 8\n");
  24. print (!(defined $opt_bar)  ? "" : "not ", "ok 9\n");
  25.