[SCM] libpackage-variant-perl Debian packaging branch, master, updated. debian/1.001003-1-16-g363631d
Robert Sedlacek
rs at 474.at
Thu May 9 17:13:55 UTC 2013
The following commit has been merged in the master branch:
commit b6086e0da219b3dc46281b04c574a02e4fa2b5a5
Author: Robert Sedlacek <rs at 474.at>
Date: Mon Nov 28 22:05:26 2011 +0100
added test for renamable import
diff --git a/t/01simple.t b/t/01simple.t
index 1520886..6cb6406 100644
--- a/t/01simple.t
+++ b/t/01simple.t
@@ -36,9 +36,11 @@ BEGIN {
$INC{'TestVariable.pm'} = __FILE__;
}
-use TestVariable;
-
-my $variant = TestVariable(3..7);
+my $variant = do {
+ package TestScopeA;
+ use TestVariable;
+ TestVariable(3..7);
+};
ok defined($variant), 'new variant is a defined value';
ok length($variant), 'new variant has length';
@@ -53,4 +55,10 @@ is_deeply shift(@DECLARED), [class => 'TestVariable'],
'class method resolution';
is scalar(@DECLARED), 0, 'proxy sub called right amount of times';
+use TestVariable as => 'RenamedVar';
+is exception {
+ my $renamed = RenamedVar(9..12);
+ is_deeply $renamed->args, [9..12], 'imported generator can be renamed';
+}, undef, 'no errors for renamed usage';
+
done_testing;
--
libpackage-variant-perl Debian packaging
More information about the Pkg-perl-cvs-commits
mailing list