File: 13-latin1.t

package info (click to toggle)
libtest-eol-perl 2.02-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 304 kB
  • sloc: perl: 341; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 587 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use strict;
use warnings;

use Test::More tests => 2;
use File::Temp qw( tempdir tempfile );

use Config;
$ENV{PERL5LIB} = join ($Config{path_sep}, @INC);

{
  my $tmpdir = tempdir( CLEANUP => 1 );
  my ($fh, $filename) = tempfile( DIR => $tmpdir, SUFFIX => '.pL' );
  print $fh "\xE1\xF3 how na\xEFve";
  close $fh;

  my (undef, $stderr) = tempfile();

  `$^X -MTest::EOL -e "all_perl_files_ok( '$tmpdir' )" 2>$stderr`;
  ok(! $? );

  my $out = do { local (@ARGV, $/) = $stderr; <> };

  is (
    $out,
    '',
    'no malformed unicode warnings on STDERR',
  );

  unlink $stderr;
}