summaryrefslogtreecommitdiff
path: root/t/01-basic.t
blob: fe205e1b1ca828c6d4fde850a9f8207a1586da02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!perl 
use Test::Most 'no_plan','die';
use strict;
use warnings;
use Tree::Template::Declare options => {builder => '+DAG_Node'};
use Data::Dumper;
 
my $tree=tree {
    node {
        name 'root';
        attribs name => 'none';
        node {
            name 'coso1';
            attribs name => 'coso_1';
        };
        node {
            name 'coso2';
        };
    };
};
 
diag $_ for @{$tree->draw_ascii_tree()};
is_deeply($tree->tree_to_lol(),
          [['coso1'],['coso2'],'root'],
          'built the tree');