summaryrefslogtreecommitdiff
path: root/t/private.t
diff options
context:
space:
mode:
Diffstat (limited to 't/private.t')
-rw-r--r--t/private.t34
1 files changed, 34 insertions, 0 deletions
diff --git a/t/private.t b/t/private.t
new file mode 100644
index 0000000..f1199ac
--- /dev/null
+++ b/t/private.t
@@ -0,0 +1,34 @@
+#!perl
+
+use strict;
+use warnings;
+
+use CPAN::Mini::Inject;
+use Test::More tests => 2;
+
+{
+ # _fmtmodule
+ my @tests = (
+ {
+ in => [ 'foo', 'foo.tar.gz', '0.01' ],
+ out => 'foo 0.01 foo.tar.gz',
+ },
+ {
+ in => [
+ 'fooIsAModuleWithAReallyLongNameSoLong'
+ . 'InFactThatItScrewsWithTheFormatting',
+ 'foo.tar.gz',
+ '0.01'
+ ],
+ out => 'fooIsAModuleWithAReallyLongNameSoLong'
+ . 'InFactThatItScrewsWithTheFormatting 0.01 foo.tar.gz',
+ },
+ );
+ for my $test ( @tests ) {
+ my $got = CPAN::Mini::Inject::_fmtmodule( @{ $test->{in} } );
+ is $got, $test->{out}, '_fmtmodule';
+ }
+}
+
+# vim:ts=2:sw=2:et:ft=perl
+