Lines Matching refs:bytes
16 is(bytes::length($a), 2, "bytes::length sanity check");
17 is(bytes::chr(0x100), chr(0), "bytes::chr sanity check");
20 use bytes;
21 my $b = chr(0x100); # affected by 'use bytes'
22 is(ord($b), 0, "chr truncates under use bytes");
23 is(length($b), 1, "length truncated under use bytes");
24 is(bytes::ord($b), 0, "bytes::ord truncated under use bytes");
25 is(bytes::length($b), 1, "bytes::length truncated under use bytes");
26 is(bytes::substr($b, 0, 1), "\0", "bytes::substr truncated under use bytes");
32 use bytes;
34 is(ord($c), 0x8c, "ord under use bytes looks at the 1st byte");
36 is(ord($c), 0xc4, "ord under use bytes looks at the 1st byte");
38 is(length($c), 2, "length under use bytes looks at bytes");
39 is(bytes::length($c), 2, "bytes::length under use bytes looks at bytes");
41 is(bytes::ord($c), 0x8c, "bytes::ord under use bytes looks at the 1st byte");
43 is(bytes::ord($c), 0xc4, "bytes::ord under use bytes looks at the 1st byte");
45 is(bytes::substr($c, 0, 1), "\xc4", "bytes::substr under use bytes looks at bytes");
46 is(bytes::index($c, "\x80"), 1, "bytes::index under use bytes looks at bytes");
47 is(bytes::rindex($c, "\xc4"), 0, "bytes::rindex under use bytes looks at bytes");