1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
#!./perl -w
BEGIN {
require './test.pl';
skip_all("'use encoding' has been removed");
skip_all_without_dynamic_extension('Encode');
skip_all("EBCDIC") if $::IS_EBCDIC;
skip_all_without_perlio();
}
plan tests => 72;
no warnings 'deprecated';
use encoding "greek"; # iso 8859-7
# U+0391, \xC1, \301, GREEK CAPITAL LETTER ALPHA
# U+03B1, \xE1, \341, GREEK SMALL LETTER ALPHA
ok("\xC1" =~ /\xC1/, '\xC1 to /\xC1/');
ok("\x{391}" =~ /\xC1/, '\x{391} to /\xC1/');
ok("\xC1" =~ /\x{C1}/, '\xC1 to /\x{C1}/');
ok("\x{391}" =~ /\x{C1}/, '\x{391} to /\x{C1}/');
ok("\xC1" =~ /\301/, '\xC1 to /\301/');
ok("\x{391}" =~ /\301/, '\x{391} to /\301/');
ok("\xC1" =~ /\x{391}/, '\xC1 to /\x{391}/');
ok("\x{391}" =~ /\x{391}/, '\x{391} to /\x{391}/');
ok("\xC1" =~ /\xC1/i, '\xC1 to /\xC1/i');
ok("\xE1" =~ /\xC1/i, '\xE1 to /\xC1/i');
ok("\xC1" =~ /\xE1/i, '\xC1 to /\xE1/i');
ok("\xE1" =~ /\xE1/i, '\xE1 to /\xE1/i');
ok("\xC1" =~ /\x{391}/i, '\xC1 to /\x{391}/i');
ok("\xE1" =~ /\x{391}/i, '\xE1 to /\x{391}/i');
ok("\xC1" =~ /\x{3B1}/i, '\xC1 to /\x{3B1}/i');
ok("\xE1" =~ /\x{3B1}/i, '\xE1 to /\x{3B1}/i');
ok("\xC1" =~ /[\xC1]/, '\xC1 to /[\xC1]/');
ok("\x{391}" =~ /[\xC1]/, '\x{391} to /[\xC1]/');
ok("\xC1" =~ /[\x{C1}]/, '\xC1 to /[\x{C1}]/');
ok("\x{391}" =~ /[\x{C1}]/, '\x{391} to /[\x{C1}]/');
ok("\xC1" =~ /[\301]/, '\xC1 to /[\301]/');
ok("\x{391}" =~ /[\301]/, '\x{391} to /[\301]/');
ok("\xC1" =~ /[\x{391}]/, '\xC1 to /[\x{391}]/');
ok("\x{391}" =~ /[\x{391}]/, '\x{391} to /[\x{391}]/');
ok("\xC1" =~ /[\xC1]/i, '\xC1 to /[\xC1]/i');
ok("\xE1" =~ /[\xC1]/i, '\xE1 to /[\xC1]/i');
ok("\xC1" =~ /[\xE1]/i, '\xC1 to /[\xE1]/i');
ok("\xE1" =~ /[\xE1]/i, '\xE1 to /[\xE1]/i');
ok("\xC1" =~ /[\x{391}]/i, '\xC1 to /[\x{391}]/i');
ok("\xE1" =~ /[\x{391}]/i, '\xE1 to /[\x{391}]/i');
ok("\xC1" =~ /[\x{3B1}]/i, '\xC1 to /[\x{3B1}]/i');
ok("\xE1" =~ /[\x{3B1}]/i, '\xE1 to /[\x{3B1}]/i');
ok("\xC1" =~ '\xC1', '\xC1 to \'\xC1\'');
ok("\xC1" =~ '\x{C1}', '\xC1 to \'\x{C1}\'');
ok("\xC1" =~ '\301', '\xC1 to \'\301\'');
ok("\xC1" =~ '\x{391}', '\xC1 to \'\x{391}\'');
ok("\xC1" =~ '[\xC1]', '\xC1 to \'[\xC1]\'');
ok("\xC1" =~ '[\x{C1}]', '\xC1 to \'[\x{C1}]\'');
ok("\xC1" =~ '[\301]', '\xC1 to \'[\301]\'');
ok("\xC1" =~ '[\x{391}]', '\xC1 to \'[\x{391}]\'');
ok("\xC1" =~ /Á/, '\xC1 to /<ALPHA>/');
ok("\xE1" !~ /Á/, '\xE1 to /<ALPHA>/');
ok("\xC1" =~ /Á/i, '\xC1 to /<ALPHA>/i');
ok("\xE1" =~ /Á/i, '\xE1 to /<ALPHA>/i');
ok("\xC1" =~ /[Á]/, '\xC1 to /[<ALPHA>]/');
ok("\xE1" !~ /[Á]/, '\xE1 to /[<ALPHA>]/');
ok("\xC1" =~ /[Á]/i, '\xC1 to /[<ALPHA>]/i');
ok("\xE1" =~ /[Á]/i, '\xE1 to /[<ALPHA>]/i');
ok("\xC1\xC1" =~ /Á\xC1/, '\xC1\xC1 to /<ALPHA>\xC1/');
ok("\xC1\xC1" =~ /\xC1Á/, '\xC1\xC1 to /\xC1<ALPHA>/');
ok("\xC1\xC1" =~ /Á\xC1/i, '\xC1\xC1 to /<ALPHA>\xC1/i');
ok("\xC1\xC1" =~ /\xC1Á/i, '\xC1\xC1 to /\xC1<ALPHA>/i');
ok("\xC1\xE1" =~ /Á\xC1/i, '\xC1\xE1 to /<ALPHA>\xC1/i');
ok("\xC1\xE1" =~ /\xC1Á/i, '\xC1\xE1 to /\xC1<ALPHA>/i');
ok("\xE1\xE1" =~ /Á\xC1/i, '\xE1\xE1 to /<ALPHA>\xC1/i');
ok("\xE1\xE1" =~ /\xC1Á/i, '\xE1\xE1 to /\xC1<ALPHA>/i');
# U+038A, \xBA, GREEK CAPITAL LETTER IOTA WITH TONOS
# U+03AF, \xDF, GREEK SMALL LETTER IOTA WITH TONOS
ok("\x{38A}" =~ /\xBA/, '\x{38A} to /\xBA/');
ok("\x{38A}" !~ /\xDF/, '\x{38A} to /\xDF/');
ok("\x{38A}" =~ /\xBA/i, '\x{38A} to /\xBA/i');
ok("\x{38A}" =~ /\xDF/i, '\x{38A} to /\xDF/i');
ok("\x{38A}" =~ /[\xBA]/, '\x{38A} to /[\xBA]/');
ok("\x{38A}" !~ /[\xDF]/, '\x{38A} to /[\xDF]/');
ok("\x{38A}" =~ /[\xBA]/i, '\x{38A} to /[\xBA]/i');
ok("\x{38A}" =~ /[\xDF]/i, '\x{38A} to /[\xDF]/i');
# \xDF is not LATIN SMALL LETTER SHARP S
ok("SS" !~ /\xDF/i, 'SS to /\xDF/i');
ok("Ss" !~ /\xDF/i, 'Ss to /\xDF/i');
ok("sS" !~ /\xDF/i, 'sS to /\xDF/i');
ok("ss" !~ /\xDF/i, 'ss to /\xDF/i');
ok("SS" !~ /ß/i, 'SS to /<iota-tonos>/i');
ok("Ss" !~ /ß/i, 'Ss to /<iota-tonos>/i');
ok("sS" !~ /ß/i, 'sS to /<iota-tonos>/i');
ok("ss" !~ /ß/i, 'ss to /<iota-tonos>/i');
|