Skip to content

Commit 06146ae

Browse files
committed
Throw out incorrect IO::ArgFiles.slurp tests
The tests were added[^1] 6 months ago and are not part of 6.c-errata. The :bin/:enc .slurp slurps in is controlled via the handle's attributes, not arguments to .slurp method. [1] rakudo/rakudo@15f51a52bd
1 parent e87e20d commit 06146ae

File tree

1 file changed

+1
-59
lines changed

1 file changed

+1
-59
lines changed

S16-filehandles/argfiles.t

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use lib 't/spec/packages';
55
use Test;
66
use Test::Util;
77

8-
plan 17;
8+
plan 16;
99

1010
sub create-temporary-file ($name = '') {
1111
my $filename = $*TMPDIR ~ '/tmp.' ~ $*PID ~ '-' ~ $name ~ '-' ~ time;
@@ -105,64 +105,6 @@ subtest '.lines accepts all Numerics as limit' => {
105105
}
106106
}
107107

108-
subtest ':bin and :enc get passed through in slurp' => {
109-
my ($file-bin, $fh-bin) = create-temporary-file 'bin';
110-
$fh-bin.print: "\x[10]\x[20]\x[30]";
111-
$fh-bin.close;
112-
113-
my ($file-enc, $fh-enc) = create-temporary-file 'enc';
114-
$fh-enc.write: Buf[uint8].new: 174; # char ® in Latin-1
115-
$fh-enc.close;
116-
117-
is_run say slurp :bin, :args[$file-bin], {
118-
:out("Buf[uint8]:0x<10 20 30>\n"),
119-
:err(''),
120-
:0status,
121-
}, 'slurp(:bin), 1 file';
122-
123-
is_run say slurp :bin, :args[$file-bin, $file-bin], {
124-
:out("Buf[uint8]:0x<10 20 30 10 20 30>\n"),
125-
:err(''),
126-
:0status,
127-
}, 'slurp(:bin), 2 files';
128-
129-
is_run $*ARGFILES.lines(0); say slurp :bin, :args[$file-bin], {
130-
:out("Buf[uint8]:0x<10 20 30>\n"),
131-
:err(''),
132-
:0status,
133-
}, 'slurp(:bin), $*ARGFILES filehandle already opened';
134-
135-
is_run say slurp :bin, "\x[10]\x[20]\x[30]", {
136-
:out("Buf[uint8]:0x<10 20 30>\n"),
137-
:err(''),
138-
:0status,
139-
}, 'slurp(:bin), STDIN';
140-
141-
is_run say slurp :enc<Latin-1>, :args[$file-enc], {
142-
:out("®\n"),
143-
:err(''),
144-
:0status,
145-
}, 'slurp(:enc<Latin-1>), 1 file';
146-
147-
is_run say slurp :enc<Latin-1>, :args[$file-enc, $file-enc], {
148-
:out("®®\n"),
149-
:err(''),
150-
:0status,
151-
}, 'slurp(:enc<Latin-1>), 2 files';
152-
153-
is_run $*ARGFILES.lines(0); say slurp :enc<Latin-1>, :args[$file-enc], {
154-
:out("®\n"),
155-
:err(''),
156-
:0status,
157-
}, 'slurp(:enc<Latin-1>), $*ARGFILES filehandle already opened';
158-
159-
is_run say slurp :enc<Latin-1>, "\x[AE]", {
160-
:out("\x[c2]\x[ae]\n"), # is_run sends input in UTF-8
161-
:err(''),
162-
:0status,
163-
}, 'slurp(:enc<Latin-1>), STDIN';
164-
}
165-
166108
# RT #130430
167109
#?rakudo.jvm todo 'appends newlines after expected output'
168110
is_run .put for $*ARGFILES.lines: 1000, "a\nb\nc", {

0 commit comments

Comments
 (0)