Update to CGI 2.70, from Lincoln Stein.
[p5sagit/p5-mst-13.2.git] / t / lib / gol-oo.t
CommitLineData
10e5c9cc 1#!./perl -w
2
3use Getopt::Long;
4die("Getopt::Long version 2.23_03 required--this is only version ".
5 $Getopt::Long::VERSION)
6 unless $Getopt::Long::VERSION ge "2.23_03";
7print "1..9\n";
8
9@ARGV = qw(-Foo -baR --foo bar);
10my $p = new Getopt::Long::Parser (config => ["no_ignore_case"]);
11undef $opt_baR;
12undef $opt_bar;
13print "ok 1\n" if $p->getoptions ("foo", "Foo=s");
14print ((defined $opt_foo) ? "" : "not ", "ok 2\n");
15print (($opt_foo == 1) ? "" : "not ", "ok 3\n");
16print ((defined $opt_Foo) ? "" : "not ", "ok 4\n");
17print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n");
18print ((@ARGV == 1) ? "" : "not ", "ok 6\n");
19print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n");
20print (!(defined $opt_baR) ? "" : "not ", "ok 8\n");
21print (!(defined $opt_bar) ? "" : "not ", "ok 9\n");