# encoding: KOI8R
# This file is encoded in KOI8-R.
die "This file is not encoded in KOI8-R.\n" if q{‚ } ne "\x82\xa0";

use KOI8R;

print "1..12\n";

# KOI8R::eval '...' has KOI8R::eval "..."
if (KOI8R::eval ' KOI8R::eval " if (\'éÁ\' =~ /[Šá]/i) { return 1 } else { return 0 } " ') {
    print qq{ok - 1 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 1 $^X @{[__FILE__]}\n};
}

# KOI8R::eval '...' has KOI8R::eval qq{...}
if (KOI8R::eval ' KOI8R::eval qq{ if (\'éÁ\' =~ /[Šá]/i) { return 1 } else { return 0 } } ') {
    print qq{ok - 2 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 2 $^X @{[__FILE__]}\n};
}

# KOI8R::eval '...' has KOI8R::eval '...'
if (KOI8R::eval ' KOI8R::eval \' if (qq{éÁ} =~ /[Šá]/i) { return 1 } else { return 0 } \' ') {
    print qq{ok - 3 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 3 $^X @{[__FILE__]}\n};
}

# KOI8R::eval '...' has KOI8R::eval q{...}
if (KOI8R::eval ' KOI8R::eval q{ if (\'éÁ\' =~ /[Šá]/i) { return 1 } else { return 0 } } ') {
    print qq{ok - 4 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 4 $^X @{[__FILE__]}\n};
}

# KOI8R::eval '...' has KOI8R::eval $var
my $var = q{ if ('éÁ' =~ /[Šá]/i) { return 1 } else { return 0 } };
if (KOI8R::eval ' KOI8R::eval $var ') {
    print qq{ok - 5 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 5 $^X @{[__FILE__]}\n};
}

# KOI8R::eval '...' has KOI8R::eval (omit)
$_ = "if ('éÁ' =~ /[Šá]/i) { return 1 } else { return 0 }";
if (KOI8R::eval ' KOI8R::eval ') {
    print qq{ok - 6 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 6 $^X @{[__FILE__]}\n};
}

# KOI8R::eval '...' has KOI8R::eval {...}
if (KOI8R::eval ' KOI8R::eval { if (\'éÁ\' =~ /[Šá]/i) { return 1 } else { return 0 } } ') {
    print qq{ok - 7 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 7 $^X @{[__FILE__]}\n};
}

# KOI8R::eval '...' has "..."
if (KOI8R::eval ' if (\'éÁ\' =~ /[Šá]/i) { return "1" } else { return "0" } ') {
    print qq{ok - 8 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 8 $^X @{[__FILE__]}\n};
}

# KOI8R::eval '...' has qq{...}
if (KOI8R::eval ' if (\'éÁ\' =~ /[Šá]/i) { return qq{1} } else { return qq{0} } ') {
    print qq{ok - 9 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 9 $^X @{[__FILE__]}\n};
}

# KOI8R::eval '...' has '...'
if (KOI8R::eval ' if (\'éÁ\' =~ /[Šá]/i) { return \'1\' } else { return \'0\' } ') {
    print qq{ok - 10 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 10 $^X @{[__FILE__]}\n};
}

# KOI8R::eval '...' has q{...}
if (KOI8R::eval ' if (\'éÁ\' =~ /[Šá]/i) { return q{1} } else { return q{0} } ') {
    print qq{ok - 11 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 11 $^X @{[__FILE__]}\n};
}

# KOI8R::eval '...' has $var
my $var1 = 1;
my $var0 = 0;
if (KOI8R::eval ' if (\'éÁ\' =~ /[Šá]/i) { return $var1 } else { return $var0 } ') {
    print qq{ok - 12 $^X @{[__FILE__]}\n};
}
else {
    print qq{not ok - 12 $^X @{[__FILE__]}\n};
}

__END__
