| 1 |
# test file for checking that the is*() functions don't crash |
| 2 |
use Win32API::File qw(SetErrorMode SEM_NOGPFAULTERRORBOX SEM_NOOPENFILEERRORBOX); |
| 3 |
use strict; |
| 4 |
use threads; |
| 5 |
use POSIX qw(isalpha islower); |
| 6 |
|
| 7 |
SetErrorMode(SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); |
| 8 |
|
| 9 |
use warnings; # we want the warnings code to run |
| 10 |
$SIG{__WARN__} = sub {}; # but don't want to display them |
| 11 |
|
| 12 |
my $t1 = threads->create(sub { isalpha("c") }); |
| 13 |
$t1->join; |
| 14 |
|
| 15 |
islower("a"); |
| 16 |
|
| 17 |
my $t2 = threads->create(sub { isalpha("a") }); |
| 18 |
$t2->join; |
| 19 |
|
| 20 |
print "ok\n"; |