1N/A chdir 't' if -d 't'; 1N/A# E.g. \t might or might not be isprint() depending on the locale, 1N/A# so let's reset to the default. 1N/A# List of characters (and strings) to feed to the is<xxx> functions. 1N/A# The left-hand side (key) is a character or string. 1N/A# The right-hand side (value) is a list of character classes to which 1N/A# this string belongs. This is a *complete* list: any classes not 1N/A# listed, are expected to return '0' for the given string. 1N/A # Multi-character strings. These are logically ANDed, so the 1N/A # presence of different types of chars in one string will 1N/A # reduce the list on the right. 1N/A # An empty string. Always true (al least in old days) [bug #24554] 1N/A# Pass 1: convert the above arrays to hashes. While doing so, obtain 1N/A# a complete list of all the 'is<xxx>' functions. At least, the ones 1N/A $functions{"is$_"}++; # Keep track of all the 'is<xxx>' functions 1N/A "is$_" => 1; # Our return value: is<xxx>($s) should pass. 1N/A# Expected number of tests is one each for every combination of a 1N/A# known is<xxx> function and string listed above. 1N/A# Main test loop: Run all POSIX::is<xxx> tests on each string defined above. 1N/A# Only the character classes listed for that string should return 1. We 1N/A# always run all functions on every string, and expect to get 0 for the 1N/A# character classes not listed in the given string's hash value.