diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-07-22 10:51:48 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-07-22 10:51:48 +0000 |
commit | 8468119f6ee8085392e5c77b735fdba19cf0f08e (patch) | |
tree | 2487c7f85fb6389d2ff81b6c42e535cf3ce227d7 /lib/Config.t | |
parent | b8170e599aeb3f6442d8a57b9d8231b9a8251123 (diff) | |
download | perl-8468119f6ee8085392e5c77b735fdba19cf0f08e.tar.gz |
Config::config_re and config_sh would report the byteorder as 'ffff'
p4raw-id: //depot/perl@23147
Diffstat (limited to 'lib/Config.t')
-rw-r--r-- | lib/Config.t | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/Config.t b/lib/Config.t index 68979c1d50..38acde6da4 100644 --- a/lib/Config.t +++ b/lib/Config.t @@ -62,8 +62,10 @@ ok(exists $Config{ccflags_nolargefiles}, "has ccflags_nolargefiles"); } } -like(Config::myconfig(), qr/osname=\Q$Config{osname}\E/, "myconfig"); -like(Config::config_sh(), qr/osname='\Q$Config{osname}\E'/, "config_sh"); +like(Config::myconfig(), qr/osname=\Q$Config{osname}\E/, "myconfig"); +like(Config::config_sh(), qr/osname='\Q$Config{osname}\E'/, "config_sh"); +like(Config::config_sh(), qr/byteorder='[1-8]+'/, + "config_sh has a valid byteorder"); foreach my $line (Config::config_re('c.*')) { like($line, qr/^c.*?=.*$/, 'config_re' ); } @@ -156,3 +158,12 @@ ok( exists $Config{d_fork}, "still d_fork"); is($Config{sig_num_init} =~ tr/,/,/, $Config{sig_size}, "sig_num_init size"); is($Config{sig_name_init} =~ tr/,/,/, $Config{sig_size}, "sig_name_init size"); + +# Test the troublesome virtual stuff +foreach my $pain (qw(byteorder)) { + # No config var is named with anything that is a regexp metachar" + my @result = Config::config_re($pain); + is (scalar @result, 1, "single result for config_re('$pain')"); + like ($result[0], qr/^$pain=(['"])$Config{$pain}\1$/, # grr ' + "which is the expected result for $pain"); +} |