Update to CGI 2.70, from Lincoln Stein.
[p5sagit/p5-mst-13.2.git] / t / lib / gol-linkage.t
CommitLineData
1a505819 1#!./perl -w
2
1a505819 3use Getopt::Long;
4
5print "1..18\n";
6
7@ARGV = qw(-Foo -baR --foo bar);
8Getopt::Long::Configure ("no_ignore_case");
9%lnk = ();
10print "ok 1\n" if GetOptions (\%lnk, "foo", "Foo=s");
11print ((defined $lnk{foo}) ? "" : "not ", "ok 2\n");
12print (($lnk{foo} == 1) ? "" : "not ", "ok 3\n");
13print ((defined $lnk{Foo}) ? "" : "not ", "ok 4\n");
14print (($lnk{Foo} eq "-baR") ? "" : "not ", "ok 5\n");
15print ((@ARGV == 1) ? "" : "not ", "ok 6\n");
16print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n");
17print (!(exists $lnk{baR}) ? "" : "not ", "ok 8\n");
18
19@ARGV = qw(-Foo -baR --foo bar);
20Getopt::Long::Configure ("default","no_ignore_case");
21%lnk = ();
22my $foo;
23print "ok 9\n" if GetOptions (\%lnk, "foo" => \$foo, "Foo=s");
24print ((defined $foo) ? "" : "not ", "ok 10\n");
25print (($foo == 1) ? "" : "not ", "ok 11\n");
26print ((defined $lnk{Foo}) ? "" : "not ", "ok 12\n");
27print (($lnk{Foo} eq "-baR") ? "" : "not ", "ok 13\n");
28print ((@ARGV == 1) ? "" : "not ", "ok 14\n");
29print (($ARGV[0] eq "bar") ? "" : "not ", "ok 15\n");
30print (!(exists $lnk{foo}) ? "" : "not ", "ok 16\n");
31print (!(exists $lnk{baR}) ? "" : "not ", "ok 17\n");
32print (!(exists $lnk{bar}) ? "" : "not ", "ok 18\n");