diff options
author | John Peacock <jpeacock@cpan.org> | 2011-07-01 23:18:09 -0400 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-07-01 21:59:24 -0700 |
commit | c8c8e589d797908c16fc78c20698c3b606331e15 (patch) | |
tree | a5bd469a635702edf2abcb9670cf9fe787a9ac49 /lib | |
parent | 005700e9b03137beeab81285c93bdf3b797bb055 (diff) | |
download | perl-c8c8e589d797908c16fc78c20698c3b606331e15.tar.gz |
Revise check for negative versions plus test
Diffstat (limited to 'lib')
-rw-r--r-- | lib/version.pm | 2 | ||||
-rw-r--r-- | lib/version.t | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/version.pm b/lib/version.pm index adeaacdd47..1126f91d5a 100644 --- a/lib/version.pm +++ b/lib/version.pm @@ -6,7 +6,7 @@ use strict; use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv); -$VERSION = 0.88; +$VERSION = 0.92; $CLASS = 'version'; diff --git a/lib/version.t b/lib/version.t index d2e3a2b35a..bee90785ac 100644 --- a/lib/version.t +++ b/lib/version.t @@ -213,6 +213,10 @@ sub BaseTests { like($@, qr/non-numeric data/, "Invalid version format (non-numeric data)"); + eval { $version = $CLASS->$method("-1.23")}; + like($@, qr/negative version number/, + "Invalid version format (negative version number)"); + # from here on out capture the warning and test independently { eval{$version = $CLASS->$method("99 and 44/100 pure")}; |