r27254 - in /trunk/dh-make-perl/t: ./ extract_name_ver_from_makefile.t makefiles/ makefiles/module-install-autodie.PL

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Tue Nov 25 08:38:52 UTC 2008


Author: dmn
Date: Tue Nov 25 08:38:49 2008
New Revision: 27254

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27254
Log:
Basic tests for extract_name_ver_from_autodie.

Added:
    trunk/dh-make-perl/t/
    trunk/dh-make-perl/t/extract_name_ver_from_makefile.t   (with props)
    trunk/dh-make-perl/t/makefiles/
    trunk/dh-make-perl/t/makefiles/module-install-autodie.PL

Added: trunk/dh-make-perl/t/extract_name_ver_from_makefile.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/extract_name_ver_from_makefile.t?rev=27254&op=file
==============================================================================
--- trunk/dh-make-perl/t/extract_name_ver_from_makefile.t (added)
+++ trunk/dh-make-perl/t/extract_name_ver_from_makefile.t Tue Nov 25 08:38:49 2008
@@ -1,0 +1,18 @@
+#!/usr/bin/perl -w
+use strict;
+use Test::More 'no_plan';
+use FindBin qw($Bin);
+
+require "$Bin/../dh-make-perl";        # Load our code for testing.
+
+my ($name, $ver);
+
+eval {
+  ($name, $ver) = 
+    extract_name_ver_from_makefile("$Bin/makefiles/module-install-autodie.PL");
+};
+
+is($@, "", "Calling extract_name_ver_from_makefile should not die on legit file");
+
+is($name, "autodie", "Module name should be autodie");
+is($ver,  "1.994",   "Module version should be 1.994");

Propchange: trunk/dh-make-perl/t/extract_name_ver_from_makefile.t
------------------------------------------------------------------------------
    svn:executable = *

Added: trunk/dh-make-perl/t/makefiles/module-install-autodie.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/makefiles/module-install-autodie.PL?rev=27254&op=file
==============================================================================
--- trunk/dh-make-perl/t/makefiles/module-install-autodie.PL (added)
+++ trunk/dh-make-perl/t/makefiles/module-install-autodie.PL Tue Nov 25 08:38:49 2008
@@ -1,0 +1,28 @@
+#!/usr/bin/perl -w
+use strict;
+use inc::Module::Install;
+
+# This isn't the same as the real autodie makefile, which takes pains
+# to be friendlier to older versions of dh-make-perl.  However it is
+# indicative of what can be found a typical Module::Install file.
+
+name		'autodie';
+
+all_from	'lib/autodie.pm';
+
+version         1.994;
+test_requires	'Test::More';
+author         'Paul Fenwick <pjf at cpan.org>';
+
+requires	'perl' => '5.8.0';
+
+recommends	'IPC::System::Simple' => '0.12'; # For autodying system()
+
+resources      repository => 'http://github.com/pfenwick/autodie/tree/master';
+resources      bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=autodie';
+resources      license    => 'http://dev.perl.org/licenses/';
+resources	Blog       => 'http://pjf.id.au/blog/toc.html?tag=autodie';
+
+installdirs    'perl';    # This overwrites a core module!
+
+WriteAll;




More information about the Pkg-perl-cvs-commits mailing list