@@ -12,7 +12,7 @@ my @endings =
12
12
# # adjusted plan to allow fine grained fudging for rakudo.jvm
13
13
# plan @endings * (1 + 3 * ( (3 * 5) + 6));
14
14
my $ extra_tests_jvm_fudging = 2 * 3 * ( 3 * ( 6 + 2 ) );
15
- plan @ endings * (1 + 3 * ( ( 3 * 5 ) + 6 )) + $ extra_tests_jvm_fudging ;
15
+ plan @ endings * (1 + 3 * ( 5 + 6 )) + $ extra_tests_jvm_fudging ;
16
16
17
17
my $ filename = ' t/spec/S16-io/lines.testing' ;
18
18
my @ text = <zero one two three four >;
@@ -26,28 +26,24 @@ for @endings -> (:key($eol), :value($EOL)) {
26
26
for (), ' ' , : chomp, ' ' , :! chomp , $ eol -> $ chomp , $ end {
27
27
my $ status = " { $ chomp . gist } / $ EOL" ;
28
28
29
- for (), True , : close, False , :! close , True -> $ closing , $ open {
30
- my $ handle = open ($ filename , : nl-in($ eol ), | $ chomp );
31
- isa-ok $ handle , IO ::Handle;
32
-
33
- my $ status = OUTER::<$status > ~ " / { $ open ?? ' open' !! ' close' } " ;
34
-
35
- my $ first ;
36
- for $ handle . lines (| $ closing ) -> $ line {
37
- # ?rakudo.jvm skip 'test will be run below with fine grained fudging'
38
- is $ line ," @ text[ 0 ] $end[ 0 ] " , " read first line: $ status" ;
39
- $ first = $ line ;
40
- last ;
41
- }
29
+ my $ handle = open ($ filename , : nl-in($ eol ), | $ chomp );
30
+ isa-ok $ handle , IO ::Handle;
42
31
43
- my @ lines = $ first , | $ handle . lines (| $ closing );
32
+ my $ first ;
33
+ for $ handle . lines -> $ line {
44
34
# ?rakudo.jvm skip 'test will be run below with fine grained fudging'
45
- is @ lines . join , @ text . join ($ end [0 ]), " rest of file: $ status" ;
46
-
47
- is $ handle . opened, $ open , " handle still open: $ status" ;
48
- ok $ handle . close , " closed handle: $ status" ;
35
+ is $ line ," @ text[ 0 ] $end[ 0 ] " , " read first line: $ status" ;
36
+ $ first = $ line ;
37
+ last ;
49
38
}
50
39
40
+ my @ lines = $ first , | $ handle . lines ;
41
+ # ?rakudo.jvm skip 'test will be run below with fine grained fudging'
42
+ is @ lines . join , @ text . join ($ end [0 ]), " rest of file: $ status" ;
43
+
44
+ ok $ handle . opened, " handle still open" ;
45
+ ok $ handle . close , " closed handle" ;
46
+
51
47
# slicing
52
48
my $ handle = open ($ filename , : nl-in($ eol ), | $ chomp );
53
49
isa-ok $ handle , IO ::Handle;
0 commit comments