File: 20-no-side-effects.t

package info (click to toggle)
libfile-slurper-perl 0.014-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 156 kB
  • sloc: perl: 354; makefile: 2
file content (24 lines) | stat: -rwxr-xr-x 422 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! perl

use strict;
use warnings;

use Test::More;
use Test::Warnings;

use File::Slurper 'read_text';
use File::Spec::Functions 'catfile';
use FindBin '$RealBin';
use File::Temp 'tempfile';

my $inputfile = catfile( $RealBin, 'data', 'cp1252.txt' );

my $s = read_text( $inputfile, 'cp1252' );

my $outfh = tempfile();
binmode $outfh, ':encoding(utf8)';

print $outfh "Snowman! \x{2603}\n";
close $outfh;

done_testing;