mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
Use set_up_inc when require.pl is loaded move plan outside of BEGIN block when no tests are run at BEGIN time. Using set_up_inc allow to run these tests under minitest but also compile them using B::C. This also has the advantage to use a single control point for @INC setup. Note: some tests cannot use 'require test.pl', unshfit is then used for them.
36 lines
641 B
Perl
36 lines
641 B
Perl
#!./perl
|
|
|
|
#
|
|
# Tests whenever the return value of select(FH) is correctly encoded.
|
|
#
|
|
|
|
BEGIN {
|
|
chdir 't' if -d 't';
|
|
require './test.pl';
|
|
set_up_inc('../lib');
|
|
}
|
|
|
|
use utf8;
|
|
use open qw( :utf8 :std );
|
|
|
|
plan( tests => 5 );
|
|
|
|
open DÙP, ">&", *STDERR;
|
|
open $dùp, ">&", *STDOUT;
|
|
open 둪, ">&", *STDERR;
|
|
open $ᛞ웊, ">&", *STDOUT;
|
|
|
|
is select(DÙP), "main::STDOUT";
|
|
is select($dùp), "main::DÙP";
|
|
|
|
TODO: {
|
|
local $TODO = "Scalar filehandles not yet clean";
|
|
is select(둪), "main::dùp";
|
|
}
|
|
|
|
is select($ᛞ웊), "main::둪";
|
|
TODO: {
|
|
local $TODO = "Scalar filehandles not yet clean";
|
|
is select(STDOUT), "main::ᛞ웊";
|
|
}
|