SYN SYN
[p5sagit/p5-mst-13.2.git] / t / lib / gol-basic.t
CommitLineData
c529f79d 1#!./perl -w
2
3BEGIN {
22d4bb9c 4 chdir('t') if -d 't';
5 @INC = '../lib';
c529f79d 6}
7
22d4bb9c 8use Getopt::Long qw(:config no_ignore_case);
9die("Getopt::Long version 2.24 required--this is only version ".
10 $Getopt::Long::VERSION)
11 unless $Getopt::Long::VERSION >= 2.24;
c529f79d 12
13print "1..9\n";
14
15@ARGV = qw(-Foo -baR --foo bar);
c529f79d 16undef $opt_baR;
17undef $opt_bar;
18print "ok 1\n" if GetOptions ("foo", "Foo=s");
19print ((defined $opt_foo) ? "" : "not ", "ok 2\n");
20print (($opt_foo == 1) ? "" : "not ", "ok 3\n");
21print ((defined $opt_Foo) ? "" : "not ", "ok 4\n");
22print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n");
23print ((@ARGV == 1) ? "" : "not ", "ok 6\n");
24print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n");
25print (!(defined $opt_baR) ? "" : "not ", "ok 8\n");
26print (!(defined $opt_bar) ? "" : "not ", "ok 9\n");