From fccabc05f273b51e37e2b07d0cf1b9ed17d0ea51 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sun, 5 Aug 2001 19:40:31 +0000 Subject: Rename the Getopt::Long tests to be as they are in the Getopt::Long official distribution. p4raw-id: //depot/perl@11588 --- MANIFEST | 8 ++++---- lib/Getopt/Long/t/basic.t | 26 -------------------------- lib/Getopt/Long/t/compat.t | 25 ------------------------- lib/Getopt/Long/t/gol-basic.t | 26 ++++++++++++++++++++++++++ lib/Getopt/Long/t/gol-compat.t | 25 +++++++++++++++++++++++++ lib/Getopt/Long/t/gol-linkage.t | 37 +++++++++++++++++++++++++++++++++++++ lib/Getopt/Long/t/gol-oo.t | 26 ++++++++++++++++++++++++++ lib/Getopt/Long/t/linkage.t | 37 ------------------------------------- lib/Getopt/Long/t/oo.t | 26 -------------------------- 9 files changed, 118 insertions(+), 118 deletions(-) delete mode 100755 lib/Getopt/Long/t/basic.t delete mode 100755 lib/Getopt/Long/t/compat.t create mode 100644 lib/Getopt/Long/t/gol-basic.t create mode 100644 lib/Getopt/Long/t/gol-compat.t create mode 100644 lib/Getopt/Long/t/gol-linkage.t create mode 100644 lib/Getopt/Long/t/gol-oo.t delete mode 100755 lib/Getopt/Long/t/linkage.t delete mode 100644 lib/Getopt/Long/t/oo.t diff --git a/MANIFEST b/MANIFEST index 7174859ab3..c51a8df4c6 100644 --- a/MANIFEST +++ b/MANIFEST @@ -925,10 +925,10 @@ lib/getopt.pl Perl library supporting option parsing lib/Getopt/Long.pm Fetch command options (GetOptions) lib/Getopt/Long/CHANGES Getopt::Long changes lib/Getopt/Long/README Getopt::Long README -lib/Getopt/Long/t/basic.t See if Getopt::Long works -lib/Getopt/Long/t/compat.t See if Getopt::Long works -lib/Getopt/Long/t/linkage.t See if Getopt::Long works -lib/Getopt/Long/t/oo.t See if Getopt::Long works +lib/Getopt/Long/t/gol-basic.t See if Getopt::Long works +lib/Getopt/Long/t/gol-compat.t See if Getopt::Long works +lib/Getopt/Long/t/gol-linkage.t See if Getopt::Long works +lib/Getopt/Long/t/gol-oo.t See if Getopt::Long works lib/Getopt/Std.pm Fetch command options (getopt, getopts) lib/Getopt/Std.t See if Getopt::Std and Getopt::Long work lib/getopts.pl Perl library supporting option parsing diff --git a/lib/Getopt/Long/t/basic.t b/lib/Getopt/Long/t/basic.t deleted file mode 100755 index c5d857d5b8..0000000000 --- a/lib/Getopt/Long/t/basic.t +++ /dev/null @@ -1,26 +0,0 @@ -#!./perl -w - -BEGIN { - chdir('t') if -d 't'; - @INC = '../lib'; -} - -use Getopt::Long qw(:config no_ignore_case); -die("Getopt::Long version 2.24 required--this is only version ". - $Getopt::Long::VERSION) - unless $Getopt::Long::VERSION >= 2.24; - -print "1..9\n"; - -@ARGV = qw(-Foo -baR --foo bar); -undef $opt_baR; -undef $opt_bar; -print "ok 1\n" if GetOptions ("foo", "Foo=s"); -print ((defined $opt_foo) ? "" : "not ", "ok 2\n"); -print (($opt_foo == 1) ? "" : "not ", "ok 3\n"); -print ((defined $opt_Foo) ? "" : "not ", "ok 4\n"); -print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n"); -print ((@ARGV == 1) ? "" : "not ", "ok 6\n"); -print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n"); -print (!(defined $opt_baR) ? "" : "not ", "ok 8\n"); -print (!(defined $opt_bar) ? "" : "not ", "ok 9\n"); diff --git a/lib/Getopt/Long/t/compat.t b/lib/Getopt/Long/t/compat.t deleted file mode 100755 index 0bbe386846..0000000000 --- a/lib/Getopt/Long/t/compat.t +++ /dev/null @@ -1,25 +0,0 @@ -#!./perl -w - -BEGIN { - chdir('t') if -d 't'; - @INC = '../lib'; -} - -require "newgetopt.pl"; - -print "1..9\n"; - -@ARGV = qw(-Foo -baR --foo bar); -$newgetopt::ignorecase = 0; -$newgetopt::ignorecase = 0; -undef $opt_baR; -undef $opt_bar; -print "ok 1\n" if NGetOpt ("foo", "Foo=s"); -print ((defined $opt_foo) ? "" : "not ", "ok 2\n"); -print (($opt_foo == 1) ? "" : "not ", "ok 3\n"); -print ((defined $opt_Foo) ? "" : "not ", "ok 4\n"); -print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n"); -print ((@ARGV == 1) ? "" : "not ", "ok 6\n"); -print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n"); -print (!(defined $opt_baR) ? "" : "not ", "ok 8\n"); -print (!(defined $opt_bar) ? "" : "not ", "ok 9\n"); diff --git a/lib/Getopt/Long/t/gol-basic.t b/lib/Getopt/Long/t/gol-basic.t new file mode 100644 index 0000000000..c5d857d5b8 --- /dev/null +++ b/lib/Getopt/Long/t/gol-basic.t @@ -0,0 +1,26 @@ +#!./perl -w + +BEGIN { + chdir('t') if -d 't'; + @INC = '../lib'; +} + +use Getopt::Long qw(:config no_ignore_case); +die("Getopt::Long version 2.24 required--this is only version ". + $Getopt::Long::VERSION) + unless $Getopt::Long::VERSION >= 2.24; + +print "1..9\n"; + +@ARGV = qw(-Foo -baR --foo bar); +undef $opt_baR; +undef $opt_bar; +print "ok 1\n" if GetOptions ("foo", "Foo=s"); +print ((defined $opt_foo) ? "" : "not ", "ok 2\n"); +print (($opt_foo == 1) ? "" : "not ", "ok 3\n"); +print ((defined $opt_Foo) ? "" : "not ", "ok 4\n"); +print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n"); +print ((@ARGV == 1) ? "" : "not ", "ok 6\n"); +print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n"); +print (!(defined $opt_baR) ? "" : "not ", "ok 8\n"); +print (!(defined $opt_bar) ? "" : "not ", "ok 9\n"); diff --git a/lib/Getopt/Long/t/gol-compat.t b/lib/Getopt/Long/t/gol-compat.t new file mode 100644 index 0000000000..0bbe386846 --- /dev/null +++ b/lib/Getopt/Long/t/gol-compat.t @@ -0,0 +1,25 @@ +#!./perl -w + +BEGIN { + chdir('t') if -d 't'; + @INC = '../lib'; +} + +require "newgetopt.pl"; + +print "1..9\n"; + +@ARGV = qw(-Foo -baR --foo bar); +$newgetopt::ignorecase = 0; +$newgetopt::ignorecase = 0; +undef $opt_baR; +undef $opt_bar; +print "ok 1\n" if NGetOpt ("foo", "Foo=s"); +print ((defined $opt_foo) ? "" : "not ", "ok 2\n"); +print (($opt_foo == 1) ? "" : "not ", "ok 3\n"); +print ((defined $opt_Foo) ? "" : "not ", "ok 4\n"); +print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n"); +print ((@ARGV == 1) ? "" : "not ", "ok 6\n"); +print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n"); +print (!(defined $opt_baR) ? "" : "not ", "ok 8\n"); +print (!(defined $opt_bar) ? "" : "not ", "ok 9\n"); diff --git a/lib/Getopt/Long/t/gol-linkage.t b/lib/Getopt/Long/t/gol-linkage.t new file mode 100644 index 0000000000..3bd81a3552 --- /dev/null +++ b/lib/Getopt/Long/t/gol-linkage.t @@ -0,0 +1,37 @@ +#!./perl -w + +BEGIN { + chdir('t') if -d 't'; + @INC = '../lib'; +} + +use Getopt::Long; + +print "1..18\n"; + +@ARGV = qw(-Foo -baR --foo bar); +Getopt::Long::Configure ("no_ignore_case"); +%lnk = (); +print "ok 1\n" if GetOptions (\%lnk, "foo", "Foo=s"); +print ((defined $lnk{foo}) ? "" : "not ", "ok 2\n"); +print (($lnk{foo} == 1) ? "" : "not ", "ok 3\n"); +print ((defined $lnk{Foo}) ? "" : "not ", "ok 4\n"); +print (($lnk{Foo} eq "-baR") ? "" : "not ", "ok 5\n"); +print ((@ARGV == 1) ? "" : "not ", "ok 6\n"); +print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n"); +print (!(exists $lnk{baR}) ? "" : "not ", "ok 8\n"); + +@ARGV = qw(-Foo -baR --foo bar); +Getopt::Long::Configure ("default","no_ignore_case"); +%lnk = (); +my $foo; +print "ok 9\n" if GetOptions (\%lnk, "foo" => \$foo, "Foo=s"); +print ((defined $foo) ? "" : "not ", "ok 10\n"); +print (($foo == 1) ? "" : "not ", "ok 11\n"); +print ((defined $lnk{Foo}) ? "" : "not ", "ok 12\n"); +print (($lnk{Foo} eq "-baR") ? "" : "not ", "ok 13\n"); +print ((@ARGV == 1) ? "" : "not ", "ok 14\n"); +print (($ARGV[0] eq "bar") ? "" : "not ", "ok 15\n"); +print (!(exists $lnk{foo}) ? "" : "not ", "ok 16\n"); +print (!(exists $lnk{baR}) ? "" : "not ", "ok 17\n"); +print (!(exists $lnk{bar}) ? "" : "not ", "ok 18\n"); diff --git a/lib/Getopt/Long/t/gol-oo.t b/lib/Getopt/Long/t/gol-oo.t new file mode 100644 index 0000000000..98f3eaadb9 --- /dev/null +++ b/lib/Getopt/Long/t/gol-oo.t @@ -0,0 +1,26 @@ +#!./perl -w + +BEGIN { + chdir('t') if -d 't'; + @INC = '../lib'; +} + +use Getopt::Long; +die("Getopt::Long version 2.24 required--this is only version ". + $Getopt::Long::VERSION) + unless $Getopt::Long::VERSION >= 2.24; +print "1..9\n"; + +@ARGV = qw(-Foo -baR --foo bar); +my $p = new Getopt::Long::Parser (config => ["no_ignore_case"]); +undef $opt_baR; +undef $opt_bar; +print "ok 1\n" if $p->getoptions ("foo", "Foo=s"); +print ((defined $opt_foo) ? "" : "not ", "ok 2\n"); +print (($opt_foo == 1) ? "" : "not ", "ok 3\n"); +print ((defined $opt_Foo) ? "" : "not ", "ok 4\n"); +print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n"); +print ((@ARGV == 1) ? "" : "not ", "ok 6\n"); +print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n"); +print (!(defined $opt_baR) ? "" : "not ", "ok 8\n"); +print (!(defined $opt_bar) ? "" : "not ", "ok 9\n"); diff --git a/lib/Getopt/Long/t/linkage.t b/lib/Getopt/Long/t/linkage.t deleted file mode 100755 index 3bd81a3552..0000000000 --- a/lib/Getopt/Long/t/linkage.t +++ /dev/null @@ -1,37 +0,0 @@ -#!./perl -w - -BEGIN { - chdir('t') if -d 't'; - @INC = '../lib'; -} - -use Getopt::Long; - -print "1..18\n"; - -@ARGV = qw(-Foo -baR --foo bar); -Getopt::Long::Configure ("no_ignore_case"); -%lnk = (); -print "ok 1\n" if GetOptions (\%lnk, "foo", "Foo=s"); -print ((defined $lnk{foo}) ? "" : "not ", "ok 2\n"); -print (($lnk{foo} == 1) ? "" : "not ", "ok 3\n"); -print ((defined $lnk{Foo}) ? "" : "not ", "ok 4\n"); -print (($lnk{Foo} eq "-baR") ? "" : "not ", "ok 5\n"); -print ((@ARGV == 1) ? "" : "not ", "ok 6\n"); -print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n"); -print (!(exists $lnk{baR}) ? "" : "not ", "ok 8\n"); - -@ARGV = qw(-Foo -baR --foo bar); -Getopt::Long::Configure ("default","no_ignore_case"); -%lnk = (); -my $foo; -print "ok 9\n" if GetOptions (\%lnk, "foo" => \$foo, "Foo=s"); -print ((defined $foo) ? "" : "not ", "ok 10\n"); -print (($foo == 1) ? "" : "not ", "ok 11\n"); -print ((defined $lnk{Foo}) ? "" : "not ", "ok 12\n"); -print (($lnk{Foo} eq "-baR") ? "" : "not ", "ok 13\n"); -print ((@ARGV == 1) ? "" : "not ", "ok 14\n"); -print (($ARGV[0] eq "bar") ? "" : "not ", "ok 15\n"); -print (!(exists $lnk{foo}) ? "" : "not ", "ok 16\n"); -print (!(exists $lnk{baR}) ? "" : "not ", "ok 17\n"); -print (!(exists $lnk{bar}) ? "" : "not ", "ok 18\n"); diff --git a/lib/Getopt/Long/t/oo.t b/lib/Getopt/Long/t/oo.t deleted file mode 100644 index 98f3eaadb9..0000000000 --- a/lib/Getopt/Long/t/oo.t +++ /dev/null @@ -1,26 +0,0 @@ -#!./perl -w - -BEGIN { - chdir('t') if -d 't'; - @INC = '../lib'; -} - -use Getopt::Long; -die("Getopt::Long version 2.24 required--this is only version ". - $Getopt::Long::VERSION) - unless $Getopt::Long::VERSION >= 2.24; -print "1..9\n"; - -@ARGV = qw(-Foo -baR --foo bar); -my $p = new Getopt::Long::Parser (config => ["no_ignore_case"]); -undef $opt_baR; -undef $opt_bar; -print "ok 1\n" if $p->getoptions ("foo", "Foo=s"); -print ((defined $opt_foo) ? "" : "not ", "ok 2\n"); -print (($opt_foo == 1) ? "" : "not ", "ok 3\n"); -print ((defined $opt_Foo) ? "" : "not ", "ok 4\n"); -print (($opt_Foo eq "-baR") ? "" : "not ", "ok 5\n"); -print ((@ARGV == 1) ? "" : "not ", "ok 6\n"); -print (($ARGV[0] eq "bar") ? "" : "not ", "ok 7\n"); -print (!(defined $opt_baR) ? "" : "not ", "ok 8\n"); -print (!(defined $opt_bar) ? "" : "not ", "ok 9\n"); -- cgit v1.2.1