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