[perl-ExtUtils-Depends/win32-test-fix: 3/4] Move old/new scheme tests from middle of other stuff to end.



commit 2d324745388eb4d2349db4602fece7e8dba2ecac
Author: Ed J <mohawk2 users noreply github com>
Date:   Mon Aug 11 18:34:09 2014 +0100

    Move old/new scheme tests from middle of other stuff to end.

 t/02_save_load.t |   54 ++++++++++++++++++++++++++++--------------------------
 1 files changed, 28 insertions(+), 26 deletions(-)
---
diff --git a/t/02_save_load.t b/t/02_save_load.t
index 4201504..7118d70 100644
--- a/t/02_save_load.t
+++ b/t/02_save_load.t
@@ -42,32 +42,6 @@ my @installed_files = qw(dep.h
                          dep-private.h);
 $dep_info->install (@installed_files);
 
-my $INC_FRAG = '-Ddistinctive';
-make_test_pkg('PkgStorenew', <<EOF);
-sub Inline { +{ INC => '$INC_FRAG' } }
-sub deps { qw(PkgStoreold) }
-EOF
-make_test_pkg('PkgStoreold', "\ deps = qw(PkgStorenew); \$inc = '$INC_FRAG';");
-sub make_test_pkg {
-  my ($base, $text) = @_;
-  my $dir = catdir($tmp_inc, $base, qw(Install));
-  mkpath($dir, 0, 0711);
-  local *FH;
-  open FH, '>', catfile($dir, 'Files.pm');
-  print FH sprintf "package %s;\n%s\n1;\n", $base . '::Install::Files', $text;
-  close FH;
-}
-sub test_load {
-  my ($info, $msg) = @_;
-  my $install_part = qr|PkgStore.*Install|;
-  like ($info->{inc}, $install_part, "$msg inc generic");
-  like ($info->{inc}, qr/$INC_FRAG/, "$msg inc specific");
-  ok (scalar(grep { /PkgStore/ } @{$info->{deps}}), $msg);
-  ok (exists $info->{libs}, $msg);
-}
-test_load (ExtUtils::Depends::load('PkgStorenew'), 'load new scheme');
-test_load (ExtUtils::Depends::load('PkgStoreold'), 'load old scheme');
-
 use Data::Dumper;
 $Data::Dumper::Terse = 1;
 $dep_info->save_config (catfile $tmp_inc, qw(DepTest Install Files.pm));
@@ -148,4 +122,32 @@ is_deeply ([ DepTest::Install::Files->deps ], [], 'api check deps method');
 
 # --------------------------------------------------------------------------- #
 
+my $INC_FRAG = '-Ddistinctive';
+make_test_pkg('PkgStorenew', <<EOF);
+sub Inline { +{ INC => '$INC_FRAG' } }
+sub deps { qw(PkgStoreold) }
+EOF
+make_test_pkg('PkgStoreold', "\ deps = qw(PkgStorenew); \$inc = '$INC_FRAG';");
+sub make_test_pkg {
+  my ($base, $text) = @_;
+  my $dir = catdir($tmp_inc, $base, qw(Install));
+  mkpath($dir, 0, 0711);
+  local *FH;
+  open FH, '>', catfile($dir, 'Files.pm');
+  print FH sprintf "package %s;\n%s\n1;\n", $base . '::Install::Files', $text;
+  close FH;
+}
+sub test_load {
+  my ($info, $msg) = @_;
+  my $install_part = qr|PkgStore.*Install|;
+  like ($info->{inc}, $install_part, "$msg inc generic");
+  like ($info->{inc}, qr/$INC_FRAG/, "$msg inc specific");
+  ok (scalar(grep { /PkgStore/ } @{$info->{deps}}), $msg);
+  ok (exists $info->{libs}, $msg);
+}
+test_load (ExtUtils::Depends::load('PkgStorenew'), 'load new scheme');
+test_load (ExtUtils::Depends::load('PkgStoreold'), 'load old scheme');
+
+# --------------------------------------------------------------------------- #
+
 done_testing;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]