This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Produce right error msg for $ver < "version"
[perl5.git]
/
lib
/
version.t
diff --git
a/lib/version.t
b/lib/version.t
index
da11023
..
ce46fa2
100644
(file)
--- a/
lib/version.t
+++ b/
lib/version.t
@@
-328,6
+328,11
@@
sub BaseTests {
$new_version = $CLASS->$method("1.1.999");
ok ( $version > $new_version, '$version > $new_version' );
$new_version = $CLASS->$method("1.1.999");
ok ( $version > $new_version, '$version > $new_version' );
+ diag "test with version class names" unless $ENV{PERL_CORE};
+ $version = $CLASS->$method("v1.2.3");
+ eval { $version < $CLASS };
+ like $@, qr/^Invalid version format/, "error with $version < $CLASS";
+
# that which is not expressly permitted is forbidden
diag "forbidden operations" unless $ENV{PERL_CORE};
ok ( !eval { ++$version }, "noop ++" );
# that which is not expressly permitted is forbidden
diag "forbidden operations" unless $ENV{PERL_CORE};
ok ( !eval { ++$version }, "noop ++" );