diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-04-07 21:13:49 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-04-07 21:13:49 +0000 |
commit | 06b4a8c77def9992257264115d36deba7767935f (patch) | |
tree | 6b88d97816f654373da730fbaabf7672f43a7c09 /gnu/usr.bin/perl/ext/POSIX | |
parent | 9e371616af376cba5e412bb75b9fc1af2fba1742 (diff) |
perl 5.8.3 from CPAN
Diffstat (limited to 'gnu/usr.bin/perl/ext/POSIX')
-rw-r--r-- | gnu/usr.bin/perl/ext/POSIX/t/is.t | 4 | ||||
-rw-r--r-- | gnu/usr.bin/perl/ext/POSIX/t/posix.t | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gnu/usr.bin/perl/ext/POSIX/t/is.t b/gnu/usr.bin/perl/ext/POSIX/t/is.t index 9ab851cd4e2..489b3a96384 100644 --- a/gnu/usr.bin/perl/ext/POSIX/t/is.t +++ b/gnu/usr.bin/perl/ext/POSIX/t/is.t @@ -52,6 +52,10 @@ my %classes = " \t" => [ qw(space) ], "abcde\001" => [], + + # An empty string. Always true (al least in old days) [bug #24554] + '' => [ qw(print graph alnum alpha lower upper digit xdigit + punct cntrl space) ], ); diff --git a/gnu/usr.bin/perl/ext/POSIX/t/posix.t b/gnu/usr.bin/perl/ext/POSIX/t/posix.t index f8339f7a4c1..58b3a4843de 100644 --- a/gnu/usr.bin/perl/ext/POSIX/t/posix.t +++ b/gnu/usr.bin/perl/ext/POSIX/t/posix.t @@ -11,7 +11,7 @@ BEGIN { } require "./test.pl"; -plan(tests => 61); +plan(tests => 65); use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write errno); @@ -259,6 +259,13 @@ ok( POSIX::isspace("\t"), 'isspace' ); ok(!POSIX::isspace('_'), 'isspace' ); ok( POSIX::isxdigit('f'), 'isxdigit' ); ok(!POSIX::isxdigit('g'), 'isxdigit' ); +# metaphysical question : what should be returned for an empty string ? +# anyway this shouldn't segfault (bug #24554) +ok( POSIX::isalnum(''), 'isalnum empty string' ); +ok( POSIX::isalnum(undef),'isalnum undef' ); +# those functions should stringify their arguments +ok(!POSIX::isalpha([]), 'isalpha []' ); +ok( POSIX::isprint([]), 'isprint []' ); # Check that output is not flushed by _exit. This test should be last # in the file, and is not counted in the total number of tests. |