[svn:parrot] r48600 - trunk/t/steps/auto
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Mon Aug 23 00:15:15 UTC 2010
Author: jkeenan
Date: Mon Aug 23 00:15:13 2010
New Revision: 48600
URL: https://trac.parrot.org/parrot/changeset/48600
Log:
Test previously uncovered condition.
Modified:
trunk/t/steps/auto/pmc-01.t
Modified: trunk/t/steps/auto/pmc-01.t
==============================================================================
--- trunk/t/steps/auto/pmc-01.t Mon Aug 23 00:14:40 2010 (r48599)
+++ trunk/t/steps/auto/pmc-01.t Mon Aug 23 00:15:13 2010 (r48600)
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 30;
+use Test::More tests => 33;
use Carp;
use Cwd;
use File::Path qw| mkpath |;
@@ -202,6 +202,25 @@
my $seen_man = auto::pmc::pmcs_in_manifest();
ok( keys %{$seen_man}, 'src/pmc/*.pmc files were seen in MANIFEST' );
+{
+ my $tdir = tempdir( CLEANUP => 1 );
+ ok( chdir $tdir, 'changed to temp directory for testing' );
+
+ my @pmcs = qw| env.pmc default.pmc null.pmc other.pmc |;
+ my $pseudoman = 'foobar';
+ open my $MAN, '>', $pseudoman or croak "Unable to open $pseudoman";
+ print $MAN "src/pmc/$_\n" for @pmcs;
+ close $MAN or croak;
+
+ my $seen_manifest = auto::pmc::pmcs_in_manifest($pseudoman);
+ is_deeply(
+ $seen_manifest,
+ { map { $_ => 1} @pmcs },
+ "Got expected files in differently named MANIFEST",
+ );
+ ok( chdir $cwd, 'changed back to original directory after testing' );
+}
+
pass("Completed all tests in $0");
################### DOCUMENTATION ###################
More information about the parrot-commits
mailing list