Update to Getopt::Long 2.23_05, from Johan Vromans.
[p5sagit/p5-mst-13.2.git] / t / lib / gol-compat.t
1 #!./perl -w
2
3 require "newgetopt.pl";
4
5 print "1..9\n";
6
7 @ARGV = qw(-Foo -baR --foo bar);
8 $newgetopt::ignorecase = 0;
9 $newgetopt::ignorecase = 0;
10 undef $opt_baR;
11 undef $opt_bar;
12 print "ok 1\n" if NGetOpt ("foo", "Foo=s");
13 print ((defined $opt_foo)   ? "" : "not ", "ok 2\n");
14 print (($opt_foo == 1)      ? "" : "not ", "ok 3\n");
15 print ((defined $opt_Foo)   ? "" : "not ", "ok 4\n");
16 print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n");
17 print ((@ARGV == 1)         ? "" : "not ", "ok 6\n");
18 print (($ARGV[0] eq "bar")  ? "" : "not ", "ok 7\n");
19 print (!(defined $opt_baR)  ? "" : "not ", "ok 8\n");
20 print (!(defined $opt_bar)  ? "" : "not ", "ok 9\n");