diff options
author | John Peacock <jpeacock@rowman.com> | 2002-10-10 17:23:01 -0400 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-10-17 14:29:41 +0000 |
commit | 46314c133ffe2db9038a340b36533579af4603b9 (patch) | |
tree | 4fe5fbd35644f6ace09758d739626ea4e99e68a7 /lib/version.t | |
parent | 09448d78b3a7197d822f3a4cddd3020b529656e9 (diff) | |
download | perl-46314c133ffe2db9038a340b36533579af4603b9.tar.gz |
Re: [PATCH] Version object combined patch
Message-ID: <3DA627F5.5050907@rowman.com>
p4raw-id: //depot/perl@18026
Diffstat (limited to 'lib/version.t')
-rw-r--r-- | lib/version.t | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/version.t b/lib/version.t index 4d4a791628..8823f23f2d 100644 --- a/lib/version.t +++ b/lib/version.t @@ -1,10 +1,10 @@ # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' -# $Revision: 2.0 $ +# $Revision: 2.1 $ ######################### -use Test::More tests => 60; +use Test::More tests => 64; use_ok(version); # If we made it this far, we are ok. my ($version, $new_version); @@ -34,6 +34,14 @@ eval {my $version = new version "1.2_3.4";}; like($@, qr/underscores before decimal/, "Invalid version format (underscores before decimal)"); +$version = new version "99 and 44/100 pure"; +ok ("$version" eq "99.0", '$version eq "99.0"'); +ok ($version->numify == 99.0, '$version->numify == 99.0'); + +$version = new version "something"; +ok ("$version" eq "", '$version eq ""'); +ok ($version->numify == 0, '$version->numify == 99.0'); + # Test boolean operator ok ($version, 'boolean'); |