diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-26 06:31:10 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-26 06:31:10 +0000 |
commit | 1571675a79745e7e3690e10ecdcf919c638d572b (patch) | |
tree | bcde2527119a19f04043c5a69c3f7e734361bad6 /t/comp | |
parent | b46bc2b69fd0825253e7e513bb1c568567aa6ab0 (diff) | |
download | perl-1571675a79745e7e3690e10ecdcf919c638d572b.tar.gz |
support for version vectors in UNIVERSAL::VERSION(), so that
C<use Foo v1.2.3> etc., work; tests for the same
TODO: XS_VERSION_BOOTCHECK needs to be revisited in light of this
p4raw-id: //depot/perl@5265
Diffstat (limited to 't/comp')
-rwxr-xr-x | t/comp/use.t | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/t/comp/use.t b/t/comp/use.t index dbbda5c038..c3cdb70709 100755 --- a/t/comp/use.t +++ b/t/comp/use.t @@ -5,7 +5,7 @@ BEGIN { unshift @INC, '../lib'; } -print "1..15\n"; +print "1..27\n"; my $i = 1; eval "use 5.000"; # implicit semicolon @@ -103,3 +103,68 @@ print "ok ",$i++,"\n"; print "not " if $INC[0] eq "freda"; print "ok ",$i++,"\n"; + +{ + local $lib::VERSION = 35.36; + eval "use lib v33.55"; + print "not " if $@; + print "ok ",$i++,"\n"; + + eval "use lib v100.105"; + unless ($@ =~ /lib version 100\.105 required--this is only version 35\.36/) { + print "not "; + } + print "ok ",$i++,"\n"; + + eval "use lib 33.55"; + print "not " if $@; + print "ok ",$i++,"\n"; + + eval "use lib 100.105"; + unless ($@ =~ /lib version 100\.105 required--this is only version 35\.36/) { + print "not "; + } + print "ok ",$i++,"\n"; + + local $lib::VERSION = '35.36'; + eval "use lib v33.55"; + print "not " if $@; + print "ok ",$i++,"\n"; + + eval "use lib v100.105"; + unless ($@ =~ /lib version 100\.105 required--this is only version 35\.36/) { + print "not "; + } + print "ok ",$i++,"\n"; + + eval "use lib 33.55"; + print "not " if $@; + print "ok ",$i++,"\n"; + + eval "use lib 100.105"; + unless ($@ =~ /lib version 100\.105 required--this is only version 35\.36/) { + print "not "; + } + print "ok ",$i++,"\n"; + + local $lib::VERSION = v35.36; + eval "use lib v33.55"; + print "not " if $@; + print "ok ",$i++,"\n"; + + eval "use lib v100.105"; + unless ($@ =~ /lib version v100\.105 required--this is only version v35\.36/) { + print "not "; + } + print "ok ",$i++,"\n"; + + eval "use lib 33.55"; + print "not " if $@; + print "ok ",$i++,"\n"; + + eval "use lib 100.105"; + unless ($@ =~ /lib version 100\.105 required--this is only version 35\.036/) { + print "not "; + } + print "ok ",$i++,"\n"; +} |