This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Unescaped left braces in regular expressions will be fatal in 5.30.
[perl5.git] / t / uni / select.t
1 #!./perl
2
3 #
4 # Tests whenever the return value of select(FH) is correctly encoded.
5 #
6
7 BEGIN {
8     chdir 't' if -d 't';
9     require './test.pl';
10     set_up_inc('../lib');
11 }
12
13 use utf8;
14 use open qw( :utf8 :std );
15
16 plan( tests => 5 );
17
18 open DÙP, ">&", *STDERR;
19 open $dùp, ">&", *STDOUT;
20 open 둪,  ">&", *STDERR;
21 open $ᛞ웊, ">&", *STDOUT;
22
23 is select(DÙP), "main::STDOUT";
24 is select($dùp), "main::DÙP";
25
26 TODO: {
27     local $TODO = "Scalar filehandles not yet clean";
28     is select(둪), "main::dùp";
29 }
30
31 is select($ᛞ웊), "main::둪";
32 TODO: {
33     local $TODO = "Scalar filehandles not yet clean";
34     is select(STDOUT), "main::ᛞ웊";
35 }