diff options
author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2013-03-13 19:16:45 +0000 |
---|---|---|
committer | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2013-03-16 10:39:43 +0000 |
commit | cdac396140ede59138b67af076981d0438e36b8b (patch) | |
tree | eda56e035a5421e1af161aea012bc6144473c5e2 /cpan/Getopt-Long/t | |
parent | 2939a5163574b7868fa5be1518413a73fcd4f8ff (diff) | |
download | perl-cdac396140ede59138b67af076981d0438e36b8b.tar.gz |
Update Getopt-Long to CPAN version 2.39
[DELTA]
Changes in version 2.39
-----------------------
* Fix unneccessary warnings when @ARGV contains undefs (yes, it
happens).
* Passing an object as first argument to the callback handler for <>
turned out to be a problem in cases where the argument was passed to
other modules, e.g., Archive::Tar. Revert the change since the added
functionality of the object is not really relevant for the <>
callback function.
* Silence the deprecation warnings from newgetopt.pl for the purpose
of testing. These tests will be removed along with newgetopt.pl in
the next major release of perl.
http://perl5.git.perl.org/perl.git/commit/b814bbfa9a2087bc
* Eliminiate spurious warning.
* Retain taintedness of command line option values.
* Document that you need to check GetOptions return value :).
* Several other minor documentation fixes and enhancements.
* Fix bug #67577 Parsing of type 'o' not correct for multiple values
Diffstat (limited to 'cpan/Getopt-Long/t')
-rw-r--r-- | cpan/Getopt-Long/t/gol-oo.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cpan/Getopt-Long/t/gol-oo.t b/cpan/Getopt-Long/t/gol-oo.t index df49cb63b2..cf1d981b9c 100644 --- a/cpan/Getopt-Long/t/gol-oo.t +++ b/cpan/Getopt-Long/t/gol-oo.t @@ -14,7 +14,7 @@ my $want_version="2.24"; die("Getopt::Long version $want_version required--this is only version ". $Getopt::Long::VERSION) unless $Getopt::Long::VERSION ge $want_version; -print "1..9\n"; +print "1..14\n"; @ARGV = qw(-Foo -baR --foo bar); my $p = new Getopt::Long::Parser (config => ["no_ignore_case"]); @@ -29,3 +29,11 @@ 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"); + +my @args = (qw[-test 1]); +my $o = Getopt::Long::Parser->new; +print "ok 10\n" if $o->getoptionsfromarray(\@args, "test=i"); +print ((defined $opt_test) ? "" : "not ", "ok 11\n"); +print (($opt_test == 1) ? "" : "not ", "ok 12\n"); +print ((@ARGV == 1) ? "" : "not ", "ok 13\n"); +print ((@args == 0) ? "" : "not ", "ok 14\n"); |