From 669d0086c4868c605ac0871f6bb102e428db4873 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Thu, 21 Jun 2001 13:42:17 +0000 Subject: Shuffle around tests to (ext|lib)/.../t/ subdirectories. Resort MANIFEST with sort -f, looks much better. p4raw-id: //depot/perl@10782 --- lib/Getopt/Long/basic.t | 26 -------------------------- lib/Getopt/Long/compat.t | 25 ------------------------- lib/Getopt/Long/linkage.t | 37 ------------------------------------- lib/Getopt/Long/oo.t | 26 -------------------------- lib/Getopt/Long/t/basic.t | 26 ++++++++++++++++++++++++++ lib/Getopt/Long/t/compat.t | 25 +++++++++++++++++++++++++ lib/Getopt/Long/t/linkage.t | 37 +++++++++++++++++++++++++++++++++++++ lib/Getopt/Long/t/oo.t | 26 ++++++++++++++++++++++++++ 8 files changed, 114 insertions(+), 114 deletions(-) delete mode 100755 lib/Getopt/Long/basic.t delete mode 100755 lib/Getopt/Long/compat.t delete mode 100755 lib/Getopt/Long/linkage.t delete mode 100644 lib/Getopt/Long/oo.t create mode 100755 lib/Getopt/Long/t/basic.t create mode 100755 lib/Getopt/Long/t/compat.t create mode 100755 lib/Getopt/Long/t/linkage.t create mode 100644 lib/Getopt/Long/t/oo.t (limited to 'lib/Getopt') diff --git a/lib/Getopt/Long/basic.t b/lib/Getopt/Long/basic.t deleted file mode 100755 index c5d857d5b8..0000000000 --- a/lib/Getopt/Long/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/compat.t b/lib/Getopt/Long/compat.t deleted file mode 100755 index 0bbe386846..0000000000 --- a/lib/Getopt/Long/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/linkage.t b/lib/Getopt/Long/linkage.t deleted file mode 100755 index 3bd81a3552..0000000000 --- a/lib/Getopt/Long/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/oo.t b/lib/Getopt/Long/oo.t deleted file mode 100644 index 98f3eaadb9..0000000000 --- a/lib/Getopt/Long/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"); diff --git a/lib/Getopt/Long/t/basic.t b/lib/Getopt/Long/t/basic.t new file mode 100755 index 0000000000..c5d857d5b8 --- /dev/null +++ b/lib/Getopt/Long/t/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/compat.t b/lib/Getopt/Long/t/compat.t new file mode 100755 index 0000000000..0bbe386846 --- /dev/null +++ b/lib/Getopt/Long/t/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/linkage.t b/lib/Getopt/Long/t/linkage.t new file mode 100755 index 0000000000..3bd81a3552 --- /dev/null +++ b/lib/Getopt/Long/t/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/oo.t b/lib/Getopt/Long/t/oo.t new file mode 100644 index 0000000000..98f3eaadb9 --- /dev/null +++ b/lib/Getopt/Long/t/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"); -- cgit v1.2.1