[PATCH] Simple tests to ensure that get_stdmodules() works.

Paul Fenwick pjf at perltraining.com.au
Tue Nov 25 05:40:24 UTC 2008


---
 t/corelist.t |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100755 t/corelist.t

diff --git a/t/corelist.t b/t/corelist.t
new file mode 100755
index 0000000..5bd6bf7
--- /dev/null
+++ b/t/corelist.t
@@ -0,0 +1,21 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+use Test::More 'no_plan';
+
+use FindBin qw($Bin);
+
+require "$Bin/../dh-make-perl";        # Load our code for testing.
+
+my @std_modules = get_stdmodules();
+
+# Check to see if our module list contains some obvious candidates.
+
+my %modules_index;
+ at modules_index{@std_modules} = ();
+
+foreach my $module ( qw(Fatal File::Copy FindBin CGI IO::Handle Safe) ) {
+    ok(exists $modules_index{$module}, "$module should be a core module");
+}
-- 
1.5.5.GIT


--------------060002040602070908000403
Content-Type: text/x-patch;
 name="0002-Updated-get_stdmodules-to-use-Module-CoreList.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename*0="0002-Updated-get_stdmodules-to-use-Module-CoreList.patch"



More information about the pkg-perl-maintainers mailing list