From: Rafael Garcia-Suarez Date: Mon, 10 Mar 2003 20:22:39 +0000 (+0000) Subject: A new test, to check that signal numbers are actually positive, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=059ca955ed31579c1bd941d140a77868e99c2fdf;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/lib/Config.t b/lib/Config.t index 99a39a4..6cdaa08 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");