File: 19_twice.t

package info (click to toggle)
libperlude-perl 0.61-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 360 kB
  • sloc: perl: 903; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 396 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/perl
use Test::More;
use Perlude;
use strict;
use warnings;

for
( [ "perlude respect multivalued returns",
     [ fold take 3, sub { 1, 2 } ]
     => [qw( 1 2 1 )] ] 
, [ "apply respect multivalued returns",
    [ fold take 3, apply { $_, $_ } sub { 8, 9 } ]
    => [qw( 8 8 8 )] ] 
) {
    my ( $desc, $got, $expected ) = @$_;
    is_deeply $got, $expected, $desc;
}

done_testing;