Debian Codegraph @

t/36pieces-attrs.t

raw
1 #!/usr/bin/perl
2
3 use v5.14;
4 use warnings;
5
6 use Test2::V0;
7
8 use lib "t";
9 use testcase "t::pieces";
10
11 BEGIN { $^H{"t::pieces/permit"} = 1; }
12
13 {
14 my $ret;
15
16 $ret = pieceattrs;
17 is( $ret, "", 'result of pieceattrs with none' );
18
19 $ret = pieceattrs :foo :bar;
20 is( $ret, ":foo():bar()", 'result of pieceattrs with two plain' );
21
22 $ret = pieceattrs :one(1) :two(2);
23 is( $ret, ":one(1):two(2)", 'result of pieceattrs with two + args' );
24
25 $ret = pieceattrs : a b c;
26 is( $ret, ":a():b():c()", 'result of pieceattrs with three no colons' );
27 }
28
29 done_testing;