+ @result = Config::config_re($pain);
+ is (scalar @result, 1, "single result for config_re('$pain')");
+ like ($result[0], qr/^$pain=(['"])\Q$Config{$pain}\E\1$/, # grr '
+ "which is the expected result for $pain");
+}
+
+# Check that config entries appear correctly in @INC
+# TestInit.pm has probably already messed with our @INC
+# This little bit of evil is to avoid a @ in the program, in case it confuses
+# shell 1 liners. We used to use a perl 1-ism, until that was deprecated, so
+# now some octal in an eval.
+my ($path, $ver, @orig_inc)
+ = split /\n/,
+ runperl (nolib=>1,
+ prog=>'print qq{$_\n} foreach $^X, $], eval qq{\100INC}');
+
+die "This perl is $] at $^X; other perl is $ver (at $path) "
+ . '- failed to find this perl' unless $] eq $ver;
+
+my %orig_inc;
+@orig_inc{@orig_inc} = ();
+
+my $failed;
+# This [used to be] the order that directories are pushed onto @INC in perl.c:
+foreach my $lib (qw(applibexp archlibexp privlibexp sitearchexp sitelibexp
+ vendorarchexp vendorlibexp)) {
+ my $dir = $Config{$lib};
+ SKIP: {
+ skip "lib $lib not in \@INC on Win32" if $^O eq 'MSWin32';
+ skip "lib $lib not defined" unless defined $dir;
+ skip "lib $lib not set" unless length $dir;
+ # May be in @INC in either Unix or VMS format on VMS.
+ if ($^O eq 'VMS' && !exists($orig_inc{$dir})) {
+ $dir = VMS::Filespec::unixify($dir);
+ $dir =~ s|/$||;
+ }
+ # So we expect to find it in @INC