Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 38 lines (30 sloc) 0.66 kB
fde97fb [spec] moved all tests from t/statemens/modifiers into t/spec/S04-sta…
dr_df0 authored
1 use v6;
2
3 use Test;
4
10b3165 [spec] all tests in S04-statement-modifiers fudged for rakudo plus mi…
dr_df0 authored
5 plan 4;
fde97fb [spec] moved all tests from t/statemens/modifiers into t/spec/S04-sta…
dr_df0 authored
6
7 # L<S04/"Conditional statements"/Conditional statement modifiers work as in Perl 5>
8
10b3165 [spec] all tests in S04-statement-modifiers fudged for rakudo plus mi…
dr_df0 authored
9 # test simple the ``until'' statement modifier
10 {
11 my $a=0;
12 $a += 1 until $a >= 10;
13 is($a, 10, "post until");
14 }
15
fde97fb [spec] moved all tests from t/statemens/modifiers into t/spec/S04-sta…
dr_df0 authored
16 # test the ``until'' statement modifier
10b3165 [spec] all tests in S04-statement-modifiers fudged for rakudo plus mi…
dr_df0 authored
17 #?rakudo skip 'rakudo enters into infinite loop'
fde97fb [spec] moved all tests from t/statemens/modifiers into t/spec/S04-sta…
dr_df0 authored
18 {
19 my ($a, $b);
10b3165 [spec] all tests in S04-statement-modifiers fudged for rakudo plus mi…
dr_df0 authored
20 $a=0; $b=0;
fde97fb [spec] moved all tests from t/statemens/modifiers into t/spec/S04-sta…
dr_df0 authored
21 $a += $b += 1 until $b >= 10;
22 is($a, 55, "post until");
23 }
24
25 {
26 my @a = ('a', 'b', 'a');
27 my $a = 'b';
28 $a ~= ', ' ~ shift @a until !+@a;
29 is($a, "b, a, b, a", "post until");
30 }
31
32 {
33 my @a = 'a'..'e';
10b3165 [spec] all tests in S04-statement-modifiers fudged for rakudo plus mi…
dr_df0 authored
34 my $a = 0;
0de784b [t] clean up various calls to try, system, etc
lwall authored
35 $a++ until shift(@a) eq 'c';
fde97fb [spec] moved all tests from t/statemens/modifiers into t/spec/S04-sta…
dr_df0 authored
36 is($a, 2, "post until");
37 }
Something went wrong with that request. Please try again.