Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (19 sloc) 0.689 kb
use v6;
use Test;
# L<S32::Containers/"List"/"=item ">
=begin pod
built-in "list" tests
=end pod
plan 6;
my $list_sub = list(1, 2, 3);
isa-ok($list_sub, List, '&list() creates a list assignable to a scalar.');
is($list_sub, (1, 2, 3), 'The &list() function created a list.');
is(+$list_sub, 3, 'Finding the length of the list works as expected.');
#?niecza skip 'Excess arguments to, used 1 of 4 positionals'
my $list_obj =, 5, 6);
isa-ok($list_obj, List, 'Creating a new list object with new works.');
is($list_obj, list(4, 5, 6), 'The list object contains the right values.');
is(+$list_obj, 3, 'Finding the length functions properly.');
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.