}
require "./test.pl";
-plan(tests => 39);
+plan(tests => 61);
use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write
like ($@, qr/^Use method IO::Handle::gets\(\) instead/,
"check its redef message");
+# Simplistic tests for the isXXX() functions (bug #16799)
+ok( POSIX::isalnum('1'), 'isalnum' );
+ok(!POSIX::isalnum('*'), 'isalnum' );
+ok( POSIX::isalpha('f'), 'isalpha' );
+ok(!POSIX::isalpha('7'), 'isalpha' );
+ok( POSIX::iscntrl("\cA"),'iscntrl' );
+ok(!POSIX::iscntrl("A"), 'iscntrl' );
+ok( POSIX::isdigit('1'), 'isdigit' );
+ok(!POSIX::isdigit('z'), 'isdigit' );
+ok( POSIX::isgraph('@'), 'isgraph' );
+ok(!POSIX::isgraph(' '), 'isgraph' );
+ok( POSIX::islower('l'), 'islower' );
+ok(!POSIX::islower('L'), 'islower' );
+ok( POSIX::isupper('U'), 'isupper' );
+ok(!POSIX::isupper('u'), 'isupper' );
+ok( POSIX::isprint('$'), 'isprint' );
+ok(!POSIX::isprint("\n"), 'isprint' );
+ok( POSIX::ispunct('%'), 'ispunct' );
+ok(!POSIX::ispunct('u'), 'ispunct' );
+ok( POSIX::isspace("\t"), 'isspace' );
+ok(!POSIX::isspace('_'), 'isspace' );
+ok( POSIX::isxdigit('f'), 'isxdigit' );
+ok(!POSIX::isxdigit('g'), 'isxdigit' );
+
# 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.
if ($^O eq 'vos') {