die
"This file is not encoded in Cyrillic.\n"
if
q{ }
ne
"\x82\xa0"
;
print
"1..5\n"
;
my
$__FILE__
= __FILE__;
my
$s
=
"The black cat climbed the green tree"
;
my
$color
= Cyrillic::
substr
$s
, 4, 5;
my
$middle
= Cyrillic::
substr
$s
, 4, -11;
my
$end
= Cyrillic::
substr
$s
, 14;
my
$tail
= Cyrillic::
substr
$s
, -4;
my
$z
= Cyrillic::
substr
$s
, -4, 2;
if
(
$color
eq
'black'
) {
print
"ok - 1 $^X $__FILE__\n"
;
}
else
{
print
"not ok - 1 $^X $__FILE__\n"
;
}
if
(
$middle
eq
'black cat climbed the'
) {
print
"ok - 2 $^X $__FILE__\n"
;
}
else
{
print
"not ok - 2 $^X $__FILE__\n"
;
}
if
(
$end
eq
'climbed the green tree'
) {
print
"ok - 3 $^X $__FILE__\n"
;
}
else
{
print
"not ok - 3 $^X $__FILE__\n"
;
}
if
(
$tail
eq
'tree'
) {
print
"ok - 4 $^X $__FILE__\n"
;
}
else
{
print
"not ok - 4 $^X $__FILE__\n"
;
}
if
(
$z
eq
'tr'
) {
print
"ok - 5 $^X $__FILE__\n"
;
}
else
{
print
"not ok - 5 $^X $__FILE__\n"
;
}