1 |
wakaba |
1.1 |
use strict; |
2 |
|
|
## Check whether perl is buggy or not |
3 |
|
|
require Test::Simple; |
4 |
|
|
my $case = 0; |
5 |
|
|
|
6 |
|
|
my $err; |
7 |
|
|
|
8 |
|
|
my @test = ( |
9 |
|
|
sub { |
10 |
|
|
my $s = 'NAME'; |
11 |
|
|
ok (scalar ($s =~ /\p{InBasicLatin}/), '\p support of perl'); |
12 |
|
|
ok (scalar ($s =~ /\p{InBasicLatin}+/), '\p+ support of perl'); |
13 |
|
|
ok (scalar ($s =~ /^\p{InBasicLatin}+$/), '^\p+$ support of perl'); |
14 |
|
|
## perl 5.8.0 has bug?? |
15 |
|
|
},'', |
16 |
|
|
sub { |
17 |
|
|
package foo; |
18 |
|
|
my $s = 'NAME'; |
19 |
|
|
main::ok (scalar ($s =~ /\p{InBasicLatin}/), 'NSed \p support of perl'); |
20 |
|
|
main::ok (scalar ($s =~ /\p{InBasicLatin}+/), 'NSed \p+ support of perl'); |
21 |
|
|
main::ok (scalar ($s =~ /^\p{InBasicLatin}+$/), 'NSed ^\p+$ support of perl'); |
22 |
|
|
}, '','','', |
23 |
|
|
); |
24 |
|
|
$case += @test; |
25 |
|
|
$case += @test; |
26 |
|
|
|
27 |
|
|
Test::Simple->import (tests => $case); |
28 |
|
|
|
29 |
|
|
for (1,2) { |
30 |
|
|
for (@test) {&$_ if ref $_} |
31 |
|
|
} |
32 |
|
|
|
33 |
|
|
exit; |
34 |
|
|
/\p{InUndefinedSet}/; |
35 |
|
|
## Older perl (such as 5.6.1) cannot run if undefined |
36 |
|
|
## (not defined by perl nor provided by "use"ed module) character class |
37 |
|
|
## is in use. |
38 |
|
|
|
39 |
|
|
=head1 LICENSE |
40 |
|
|
|
41 |
|
|
Copyright 2003 Wakaba <w@suika.fam.cx> |
42 |
|
|
|
43 |
|
|
This program is free software; you can redistribute it and/or |
44 |
|
|
modify it under the same terms as Perl itself. |
45 |
|
|
|
46 |
|
|
=cut |
47 |
|
|
|
48 |
|
|
1; # $Date: 2003/08/05 12:20:00 $ |