Change 23610 by [EMAIL PROTECTED] on 2004/12/06 10:35:00

        Check that @INC entries and %Config path entries are consistent.

Affected files ...

... //depot/perl/lib/Config.t#26 edit

Differences ...

==== //depot/perl/lib/Config.t#26 (text) ====
Index: perl/lib/Config.t
--- perl/lib/Config.t#25~23545~ Fri Nov 26 04:33:34 2004
+++ perl/lib/Config.t   Mon Dec  6 02:35:00 2004
@@ -234,3 +234,29 @@
        "which is the expected result for $pain");
 }
 
+# Check that config entries appear correctly in @INC
+# TestInit.pm has probably already messed with our @INC
+my ($path, $ver, @orig_inc)
+  = split /\n/, runperl (nolib=>1, prog=>'print qq{$_\n} for $^X, $], @INC');
+
+die "This perl is $] at $^X; other perl is $ver (at $path) "
+  . '- failed to find this perl' unless $] eq $ver;
+
+my %orig_inc;
[EMAIL PROTECTED]@orig_inc} = ();
+
+my $failed;
+# This is the order that directories are pushed onto @INC in perl.c:
+foreach my $lib (qw(applibexp archlibexp privlibexp sitearchexp sitelibexp
+                    vendorarchexp vendorlibexp vendorlib_stem)) {
+  my $dir = $Config{$lib};
+  SKIP: {
+    skip "lib $lib not defined" unless defined $dir;
+    skip "lib $lib not set" unless length $dir;
+    # So we expect to find it in @INC
+
+    ok (exists $orig_inc{$dir}, "Expect $lib '$dir' to be in [EMAIL 
PROTECTED]")
+      or $failed++;
+  }
+}
+_diag ('@INC is:', @orig_inc) if $failed;
End of Patch.

Reply via email to