Forest
view release on metacpan or search on metacpan
t/032_Tree_Writer_complex_ASCII.t view on Meta::CPAN
my $reader = Forest::Tree::Reader::SimpleTextFile->new;
$reader->read(\*DATA);
{
my $w = Forest::Tree::Writer::ASCIIWithBranches->new(tree => $reader->tree);
isa_ok($w, 'Forest::Tree::Writer::ASCIIWithBranches');
isa_ok($w->tree, 'Forest::Tree');
# FOR DEBUGGIN
#use Test::Differences;
#eq_or_diff($w->as_string,
is($w->as_string,
q{root
|---1.0
| |---1.1
| |---1.2
| |---1.2.1
|---2.0
| |---2.1
t/032_Tree_Writer_complex_ASCII.t view on Meta::CPAN
),
]
);
my $w = Forest::Tree::Writer::ASCIIWithBranches->new(
tree => Forest::Tree->new(children => [ $tree ])
);
isa_ok($w, 'Forest::Tree::Writer::ASCIIWithBranches');
# FOR DEBUGGIN
#use Test::Differences;
#eq_or_diff($w->as_string,
is($w->as_string,
q{root
|---1.0
| |---1.1
| |---1.2
| |---1.2.1
|---2.0
| |---2.1
( run in 2.334 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )