Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 24 lines (20 sloc) 0.512 kb
5309a5fd » moritz
2008-11-25 [t/spec] add tests for RT #60404
1 use v6;
2 use Test;
3 plan 3;
4
5 {
6 sub count(@a) {
7 my $x = 0;
8 $x++ for @a;
9 return $x;
10 }
11
12 is count([1, 2, 3, 4]), 1, 'count([1, 2, 3, 4])';
13 is count(my @b = 1, 2, 3, 4), 4, 'count(my @b = 1, 2, 3)';
1216c988 » jnthn
2008-11-27 [t/spec] Another test for passing with lists/scalar interaction that …
14 is count((1, 2, 3)), 3, 'count((1, 2, 3))';
15
16 sub count2($a) {
17 my $x = 0;
18 $x++ for $a;
19 return $x;
20 }
21
22 #?rakudo skip "not handling scalars being passed lists correctly"
23 is count2((1,2,3)), 1, 'count2((1,2,3))';
5309a5fd » moritz
2008-11-25 [t/spec] add tests for RT #60404
24 }
25
Something went wrong with that request. Please try again.