$_ = ">\x{263A}<";
s/([\x{80}-\x{10ffff}])/"&#".ord($1).";"/eg;
ok $_, '>☺<';
- $test++;
+ $test++; # 1
$_ = ">\x{263A}<";
my $rx = "\x{80}-\x{10ffff}";
s/([$rx])/"&#".ord($1).";"/eg;
ok $_, '>☺<';
- $test++;
+ $test++; # 2
$_ = ">\x{263A}<";
my $rx = "\\x{80}-\\x{10ffff}";
s/([$rx])/"&#".ord($1).";"/eg;
ok $_, '>☺<';
- $test++;
+ $test++; # 3
$_ = "alpha,numeric";
m/([[:alpha:]]+)/;
ok $1, 'alpha';
- $test++;
+ $test++; # 4
$_ = "alphaNUMERICstring";
m/([[:^lower:]]+)/;
ok $1, 'NUMERIC';
- $test++;
+ $test++; # 5
$_ = "alphaNUMERICstring";
m/(\p{Ll}+)/;
ok $1, 'alpha';
- $test++;
+ $test++; # 6
$_ = "alphaNUMERICstring";
m/(\p{Lu}+)/;
ok $1, 'NUMERIC';
- $test++;
+ $test++; # 7
$_ = "alpha,numeric";
m/([\p{IsAlpha}]+)/;
ok $1, 'alpha';
- $test++;
+ $test++; # 8
$_ = "alphaNUMERICstring";
m/([^\p{IsLower}]+)/;
ok $1, 'NUMERIC';
- $test++;
+ $test++; # 9
$_ = "alpha123numeric456";
m/([\p{IsDigit}]+)/;
ok $1, '123';
- $test++;
+ $test++; # 10
$_ = "alpha123numeric456";
m/([^\p{IsDigit}]+)/;
ok $1, 'alpha';
- $test++;
+ $test++; # 11
$_ = ",123alpha,456numeric";
m/([\p{IsAlnum}]+)/;
ok $1, '123alpha';
- $test++;
+ $test++; # 12
}
{
use utf8;
$_ = "\x{263A}>\x{263A}\x{263A}";
ok length, 4;
- $test++;
+ $test++; # 13
ok length((m/>(.)/)[0]), 1;
- $test++;
+ $test++; # 14
ok length($&), 2;
- $test++;
+ $test++; # 15
ok length($'), 1;
- $test++;
+ $test++; # 16
ok length($`), 1;
- $test++;
+ $test++; # 17
ok length($1), 1;
- $test++;
+ $test++; # 18
ok length($tmp=$&), 2;
- $test++;
+ $test++; # 19
ok length($tmp=$'), 1;
- $test++;
+ $test++; # 20
ok length($tmp=$`), 1;
- $test++;
+ $test++; # 21
ok length($tmp=$1), 1;
- $test++;
+ $test++; # 22
- ok $&, pack("C*", ord(">"), 0342, 0230, 0272);
- $test++;
+ {
+ use bytes;
+
+ my $tmp = $&;
+ ok $tmp, pack("C*", ord(">"), 0342, 0230, 0272);
+ $test++; # 23
- ok $', pack("C*", 0342, 0230, 0272);
- $test++;
+ $tmp = $';
+ ok $tmp, pack("C*", 0342, 0230, 0272);
+ $test++; # 24
- ok $`, pack("C*", 0342, 0230, 0272);
- $test++;
+ $tmp = $`;
+ ok $tmp, pack("C*", 0342, 0230, 0272);
+ $test++; # 25
- ok $1, pack("C*", 0342, 0230, 0272);
- $test++;
+ $tmp = $1;
+ ok $tmp, pack("C*", 0342, 0230, 0272);
+ $test++; # 26
+ }
{
use bytes;
no utf8;
ok length, 10;
- $test++;
+ $test++; # 27
ok length((m/>(.)/)[0]), 1;
- $test++;
+ $test++; # 28
ok length($&), 2;
- $test++;
+ $test++; # 29
ok length($'), 5;
- $test++;
+ $test++; # 30
ok length($`), 3;
- $test++;
+ $test++; # 31
ok length($1), 1;
- $test++;
+ $test++; # 32
ok $&, pack("C*", ord(">"), 0342);
- $test++;
+ $test++; # 33
ok $', pack("C*", 0230, 0272, 0342, 0230, 0272);
- $test++;
+ $test++; # 34
ok $`, pack("C*", 0342, 0230, 0272);
- $test++;
+ $test++; # 35
ok $1, pack("C*", 0342);
- $test++;
+ $test++; # 36
}
}
ok length, 10;
- $test++;
+ $test++; # 37
ok length((m/>(.)/)[0]), 1;
- $test++;
+ $test++; # 38
ok length($&), 2;
- $test++;
+ $test++; # 39
ok length($'), 1;
- $test++;
+ $test++; # 40
ok length($`), 1;
- $test++;
+ $test++; # 41
ok length($1), 1;
- $test++;
+ $test++; # 42
ok length($tmp=$&), 2;
- $test++;
+ $test++; # 43
ok length($tmp=$'), 1;
- $test++;
+ $test++; # 44
ok length($tmp=$`), 1;
- $test++;
+ $test++; # 45
ok length($tmp=$1), 1;
- $test++;
+ $test++; # 46
- ok $&, pack("C*", ord(">"), 0342, 0230, 0272);
- $test++;
+ {
+ use bytes;
- ok $', pack("C*", 0342, 0230, 0272);
- $test++;
+ my $tmp = $&;
+ ok $tmp, pack("C*", ord(">"), 0342, 0230, 0272);
+ $test++; # 47
- ok $`, pack("C*", 0342, 0230, 0272);
- $test++;
+ $tmp = $';
+ ok $tmp, pack("C*", 0342, 0230, 0272);
+ $test++; # 48
- ok $1, pack("C*", 0342, 0230, 0272);
- $test++;
+ $tmp = $`;
+ ok $tmp, pack("C*", 0342, 0230, 0272);
+ $test++; # 49
+ $tmp = $1;
+ ok $tmp, pack("C*", 0342, 0230, 0272);
+ $test++; # 50
+ }
{
use bytes;
no utf8;
ok length, 10;
- $test++;
+ $test++; # 51
ok length((m/>(.)/)[0]), 1;
- $test++;
+ $test++; # 52
ok length($&), 2;
- $test++;
+ $test++; # 53
ok length($'), 5;
- $test++;
+ $test++; # 54
ok length($`), 3;
- $test++;
+ $test++; # 55
ok length($1), 1;
- $test++;
+ $test++; # 56
ok $&, pack("C*", ord(">"), 0342);
- $test++;
+ $test++; # 57
ok $', pack("C*", 0230, 0272, 0342, 0230, 0272);
- $test++;
+ $test++; # 58
ok $`, pack("C*", 0342, 0230, 0272);
- $test++;
+ $test++; # 59
ok $1, pack("C*", 0342);
- $test++;
+ $test++; # 60
}
}