This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deprecate wide chars in logical string ops
[perl5.git] / t / lib / warnings / doop
CommitLineData
f9b950a2 1__END__
0453d815
PM
2# doop.c
3use utf8 ;
4$_ = "\x80 \xff" ;
5chop ;
6EXPECT
0453d815 7########
87e05d1a
KW
8# NAME deprecation of logical bit operations with above ff code points
9$_ = "\xFF" & "\x{100}"; # Above ff second
10$_ = "\xFF" | "\x{101}";
11$_ = "\xFF" ^ "\x{102}";
12$_ = "\x{100}" & "\x{FF}"; # Above ff first
13$_ = "\x{101}" | "\x{FF}";
14$_ = "\x{102}" ^ "\x{FF}";
15$_ = "\x{100}" & "\x{103}"; # both above ff has just one message raised
16$_ = "\x{101}" | "\x{104}";
17$_ = "\x{102}" ^ "\x{105}";
18no warnings 'deprecated';
19$_ = "\xFF" & "\x{100}";
20$_ = "\xFF" | "\x{101}";
21$_ = "\xFF" ^ "\x{101}";
22$_ = "\x{100}" & "\x{FF}";
23$_ = "\x{101}" | "\x{FF}";
24$_ = "\x{102}" ^ "\x{FF}";
25$_ = "\x{100}" & "\x{103}";
26$_ = "\x{101}" | "\x{104}";
27$_ = "\x{102}" ^ "\x{105}";
28EXPECT
29Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is deprecated at - line 1.
30Use of strings with code points over 0xFF as arguments to bitwise or (|) operator is deprecated at - line 2.
31Use of strings with code points over 0xFF as arguments to bitwise xor (^) operator is deprecated at - line 3.
32Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is deprecated at - line 4.
33Use of strings with code points over 0xFF as arguments to bitwise or (|) operator is deprecated at - line 5.
34Use of strings with code points over 0xFF as arguments to bitwise xor (^) operator is deprecated at - line 6.
35Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is deprecated at - line 7.
36Use of strings with code points over 0xFF as arguments to bitwise or (|) operator is deprecated at - line 8.
37Use of strings with code points over 0xFF as arguments to bitwise xor (^) operator is deprecated at - line 9.