diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-03-10 20:22:39 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-03-10 20:22:39 +0000 |
commit | 059ca955ed31579c1bd941d140a77868e99c2fdf (patch) | |
tree | b019a5329e4af3a1f2051dd178997540fad26e13 /lib/Config.t | |
parent | b77f7d40943072c6b8a82e9e0fbdcc2d346120ee (diff) | |
download | perl-059ca955ed31579c1bd941d140a77868e99c2fdf.tar.gz |
A new test, to check that signal numbers are actually positive,
and that there is a consistent number of signals available.
p4raw-id: //depot/perl@18891
Diffstat (limited to 'lib/Config.t')
-rw-r--r-- | lib/Config.t | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/Config.t b/lib/Config.t index 99a39a49f8..6cdaa088af 100644 --- a/lib/Config.t +++ b/lib/Config.t @@ -6,7 +6,7 @@ BEGIN { require "./test.pl"; } -plan tests => 34; +plan tests => 36; use_ok('Config'); @@ -102,18 +102,25 @@ like($@, qr/Config is read-only/, "no CLEAR"); ok( exists $Config{d_fork}, "still d_fork"); -package FakeOut; +{ + package FakeOut; -sub TIEHANDLE { - bless(\(my $text), $_[0]); -} + sub TIEHANDLE { + bless(\(my $text), $_[0]); + } -sub clear { - ${ $_[0] } = ''; -} + sub clear { + ${ $_[0] } = ''; + } -sub PRINT { - my $self = shift; - $$self .= join('', @_); + sub PRINT { + my $self = shift; + $$self .= join('', @_); + } } +# Signal-related variables +# (this is actually a regression test for Configure.) + +ok((split / /, $Config{sig_num}) == $Config{sig_size}, "sig_size"); +like($Config{sig_num}, qr/^[ \d]+\z/, "sig_num has only positive numbers"); |