Upgrade to Getopt::Long 2.32_05
[p5sagit/p5-mst-13.2.git] / lib / Getopt / Long / t / gol-compat.t
CommitLineData
1a505819 1#!./perl -w
2
36e6c0f5 3BEGIN {
10933be5 4 if ($ENV{PERL_CORE}) {
5 @INC = '../lib';
6 chdir 't';
7 }
36e6c0f5 8}
9
1a505819 10require "newgetopt.pl";
11
12print "1..9\n";
13
14@ARGV = qw(-Foo -baR --foo bar);
15$newgetopt::ignorecase = 0;
16$newgetopt::ignorecase = 0;
17undef $opt_baR;
18undef $opt_bar;
19print "ok 1\n" if NGetOpt ("foo", "Foo=s");
20print ((defined $opt_foo) ? "" : "not ", "ok 2\n");
21print (($opt_foo == 1) ? "" : "not ", "ok 3\n");
22print ((defined $opt_Foo) ? "" : "not ", "ok 4\n");
23print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n");
24print ((@ARGV == 1) ? "" : "not ", "ok 6\n");
25print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n");
26print (!(defined $opt_baR) ? "" : "not ", "ok 8\n");
27print (!(defined $opt_bar) ? "" : "not ", "ok 9\n");