5 unshift @INC, '../lib';
8 require "newgetopt.pl";
12 @ARGV = qw(-Foo -baR --foo bar);
13 $newgetopt::ignorecase = 0;
14 $newgetopt::ignorecase = 0;
17 print "ok 1\n" if NGetOpt ("foo", "Foo=s");
18 print ((defined $opt_foo) ? "" : "not ", "ok 2\n");
19 print (($opt_foo == 1) ? "" : "not ", "ok 3\n");
20 print ((defined $opt_Foo) ? "" : "not ", "ok 4\n");
21 print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n");
22 print ((@ARGV == 1) ? "" : "not ", "ok 6\n");
23 print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n");
24 print (!(defined $opt_baR) ? "" : "not ", "ok 8\n");
25 print (!(defined $opt_bar) ? "" : "not ", "ok 9\n");