[Rt-commit] r5605 - in Test-Dependencies/trunk: . lib/Test t t-data t-data/empty t-data/mostly-empty

zev at bestpractical.com zev at bestpractical.com
Tue Jul 18 22:48:14 EDT 2006


Author: zev
Date: Tue Jul 18 22:48:12 2006
New Revision: 5605

Added:
   Test-Dependencies/trunk/t-data/
   Test-Dependencies/trunk/t-data/empty/
   Test-Dependencies/trunk/t-data/mostly-empty/
   Test-Dependencies/trunk/t-data/mostly-empty/META.yml
   Test-Dependencies/trunk/t-data/mostly-empty/lib/
   Test-Dependencies/trunk/t-data/mostly-empty/lib/empty
   Test-Dependencies/trunk/t/03-empty.t
Modified:
   Test-Dependencies/trunk/   (props changed)
   Test-Dependencies/trunk/Changes
   Test-Dependencies/trunk/MANIFEST
   Test-Dependencies/trunk/META.yml
   Test-Dependencies/trunk/Makefile.PL
   Test-Dependencies/trunk/lib/Test/Dependencies.pm
   Test-Dependencies/trunk/t/00-load-basic.t
   Test-Dependencies/trunk/t/01-load-with-exclude.t

Log:
 r16031 at galvatron:  zev | 2006-07-18 22:47:52 -0400
 * removed references to test_pass (and upped Test::Builder::Tester dep to 0.64)
 * rearranged changelog
 * added tests for empty files and directories
 * bumped version number to 0.05
 


Modified: Test-Dependencies/trunk/Changes
==============================================================================
--- Test-Dependencies/trunk/Changes	(original)
+++ Test-Dependencies/trunk/Changes	Tue Jul 18 22:48:12 2006
@@ -1,10 +1,13 @@
 Revision history for Test-Dependencies
 
-0.01    Wed Jun 21 12:29:39 EDT 2006
-        First release, based on Jifty's 00-dependencies.t
+0.05
+        * removed references to test_pass (and upped Test::Builder::Tester dep to 0.64)
+        * rearranged changelog
+        * added tests for empty files and directories
 
-0.02    Wed Jun 21 16:34:14 EDT 2006
-        Minor POD cleanups
+0.04    Sat Jul 15 00:24:01 EDT 2006
+        * Properly specify the dependency on Test::Builder::Tester 0.63.
+        * handle empty files
 
 0.03    Tue Jul 11 16:17:32 EDT 2006
         Moved to a B::PerlReq backend for determining usage.  We
@@ -13,6 +16,8 @@
         build_requires, and complain if listed requirements are not
         actually used.
 
-0.04    Sat Jul 15 00:24:01 EDT 2006
-        * Properly specify the dependency on Test::Builder::Tester 0.63.
-        * handle empty files
\ No newline at end of file
+0.02    Wed Jun 21 16:34:14 EDT 2006
+        Minor POD cleanups
+
+0.01    Wed Jun 21 12:29:39 EDT 2006
+        First release, based on Jifty's 00-dependencies.t
\ No newline at end of file

Modified: Test-Dependencies/trunk/MANIFEST
==============================================================================
--- Test-Dependencies/trunk/MANIFEST	(original)
+++ Test-Dependencies/trunk/MANIFEST	Tue Jul 18 22:48:12 2006
@@ -15,9 +15,12 @@
 MANIFEST			This list of files
 META.yml
 README
+t-data/mostly-empty/lib/empty
+t-data/mostly-empty/META.yml
 t/00-load-basic.t
 t/01-load-with-exclude.t
 t/02-dependencies.t
+t/03-empty.t
 t/boilerplate.t
 t/pod-coverage.t
 t/pod.t

Modified: Test-Dependencies/trunk/META.yml
==============================================================================
--- Test-Dependencies/trunk/META.yml	(original)
+++ Test-Dependencies/trunk/META.yml	Tue Jul 18 22:48:12 2006
@@ -1,6 +1,6 @@
 author: Zev Benjamin <zev at cpan.com>
 build_requires: 
-  Test::Builder::Tester: 0.63
+  Test::Builder::Tester: 0.64
 distribution_type: module
 generated_by: Module::Install version 0.630
 license: perl
@@ -16,4 +16,4 @@
   PerlReq::Utils: 0
   Test::Builder::Module: 0
   YAML: 0
-version: 0.04
+version: 0.05

Modified: Test-Dependencies/trunk/Makefile.PL
==============================================================================
--- Test-Dependencies/trunk/Makefile.PL	(original)
+++ Test-Dependencies/trunk/Makefile.PL	Tue Jul 18 22:48:12 2006
@@ -12,7 +12,7 @@
 requires('Test::Builder::Module');
 requires('YAML');
 
-build_requires('Test::Builder::Tester' => 0.63);
+build_requires('Test::Builder::Tester' => 0.64);
 
 auto_install;
 WriteAll;

Modified: Test-Dependencies/trunk/lib/Test/Dependencies.pm
==============================================================================
--- Test-Dependencies/trunk/lib/Test/Dependencies.pm	(original)
+++ Test-Dependencies/trunk/lib/Test/Dependencies.pm	Tue Jul 18 22:48:12 2006
@@ -22,7 +22,7 @@
 
 =cut
 
-our $VERSION = '0.04';
+our $VERSION = '0.05';
 
 =head1 SYNOPSIS
 
@@ -152,9 +152,16 @@
   foreach my $mod (keys %used) {
     delete $build_used{$mod} if exists $build_used{$mod};
   }
-  
+
+  if (-r 'META.yml') {
+    $tb->ok(1, 'META.yml is present and readable');
+  } else {
+    $tb->ok(0, 'META.yml is present and readable');
+    $tb->diag("You seem to be missing a META.yml.  I can't check which dependencies you've declared without it\n");
+    return;
+  }
   my $meta = LoadFile('META.yml') or die 'Could not load META.YML';
-  my %required = exists $meta->{requires} ? %{$meta->{requires}} : ();
+  my %required = exists $meta->{requires} && defined $meta->{requires} ? %{$meta->{requires}} : ();
   my %build_required = exists $meta->{build_requires} ? %{$meta->{build_requires}} : ();
 
   my @in_core;

Added: Test-Dependencies/trunk/t-data/mostly-empty/META.yml
==============================================================================
--- (empty file)
+++ Test-Dependencies/trunk/t-data/mostly-empty/META.yml	Tue Jul 18 22:48:12 2006
@@ -0,0 +1,2 @@
+author: Zev Benjamin <zev at cpan.com>
+requires: ~

Added: Test-Dependencies/trunk/t-data/mostly-empty/lib/empty
==============================================================================

Modified: Test-Dependencies/trunk/t/00-load-basic.t
==============================================================================
--- Test-Dependencies/trunk/t/00-load-basic.t	(original)
+++ Test-Dependencies/trunk/t/00-load-basic.t	Tue Jul 18 22:48:12 2006
@@ -4,7 +4,7 @@
 use Test::More tests => 1;
 
 BEGIN {
-  test_pass("use Test::Dependencies;");
+  test_out('ok 1 - use Test::Dependencies;');
   use_ok('Test::Dependencies');
   test_test("use Test::Dependencies;");
 }

Modified: Test-Dependencies/trunk/t/01-load-with-exclude.t
==============================================================================
--- Test-Dependencies/trunk/t/01-load-with-exclude.t	(original)
+++ Test-Dependencies/trunk/t/01-load-with-exclude.t	Tue Jul 18 22:48:12 2006
@@ -4,7 +4,7 @@
 use Test::More tests => 1;
 
 BEGIN {
-  test_pass("use Test::Dependencies;");
+  test_out("ok 1 - use Test::Dependencies;");
   use_ok( 'Test::Dependencies', 'exclude',
           [qw/Some::Namespace Some::Other::Namespace/] );
   test_test("use Test::Dependencies;");

Added: Test-Dependencies/trunk/t/03-empty.t
==============================================================================
--- (empty file)
+++ Test-Dependencies/trunk/t/03-empty.t	Tue Jul 18 22:48:12 2006
@@ -0,0 +1,18 @@
+#!perl
+
+use Test::Builder::Tester tests => 2;
+use Test::Dependencies;
+
+chdir "t-data/empty";
+
+test_out("not ok 1 - META.yml is present and readable");
+test_fail(+2);
+test_diag("You seem to be missing a META.yml.  I can't check which dependencies you've declared without it");
+ok_dependencies();
+test_test("empty directory fails to find META.yml");
+
+chdir "../../t-data/mostly-empty";
+
+test_out("ok 1 - META.yml is present and readable");
+ok_dependencies();
+test_test("mostly empty directory works just fine");


More information about the Rt-commit mailing list