summaryrefslogtreecommitdiff
path: root/lib/Config.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-11-25 21:33:23 +0000
committerNicholas Clark <nick@ccl4.org>2004-11-25 21:33:23 +0000
commite9a5b206a27d8bea1fef9f43666333f221ba873d (patch)
tree54026046c7c66f36709b0380464520839db044a0 /lib/Config.t
parenta6ea97718dffb91a71a91992c89ec1a939d696f3 (diff)
downloadperl-e9a5b206a27d8bea1fef9f43666333f221ba873d.tar.gz
The first entry in the virtual config.sh is special cased. So
test it. p4raw-id: //depot/perl@23537
Diffstat (limited to 'lib/Config.t')
-rw-r--r--lib/Config.t12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Config.t b/lib/Config.t
index 352cbc765b..d2451b8354 100644
--- a/lib/Config.t
+++ b/lib/Config.t
@@ -208,14 +208,21 @@ is($Config{sig_name_init} =~ tr/,/,/, $Config{sig_size}, "sig_name_init size");
my @virtual = qw(byteorder ccflags_nolargefiles ldflags_nolargefiles
libs_nolargefiles libswanted_nolargefiles);
-foreach my $pain (@virtual) {
+# Also test that the first entry in config.sh is found correctly. Currently
+# there is special casing code for this
+my ($first) = Config::config_sh() =~ /^(\S+)=/m;
+die "Can't find first entry in Config::config_sh()" unless defined $first;
+print "# First entry is '$first'\n";
+
+foreach my $pain ($first, @virtual) {
# No config var is named with anything that is a regexp metachar
my @result = $Config{$pain};
is (scalar @result, 1, "single result for \$config('$pain')");
TODO: {
local $TODO;
- $TODO = "No regexp lookup for $pain yet" unless $pain eq 'byteorder';
+ $TODO = "No regexp lookup for $pain yet"
+ unless $pain eq 'byteorder' or $pain eq $first;
@result = Config::config_re($pain);
is (scalar @result, 1, "single result for config_re('$pain')");
@@ -223,3 +230,4 @@ foreach my $pain (@virtual) {
"which is the expected result for $pain");
}
}
+