Catalyst-View-Spreadsheet-Template

 view release on metacpan or  search on metacpan

t/utf8.t  view on Meta::CPAN

    my $font = $format->{Font};
    is($font->{Name}, 'Calibri');
    is($font->{Height}, 12);
    is($font->{Color}, '#4BACC6');
}

{
    my $cell = $ws->get_cell(4, 0);
    is($cell->unformatted, 30);
    is($cell->value, 30);
    is($cell->type, 'Numeric');
    is($cell->{Formula}, undef);

    my $format = $cell->get_format;
    is($format->{AlignH}, 0);
    is($format->{AlignV}, 2);
    ok(!$format->{Wrap});
    is_deeply($format->{Fill}, [0, undef, undef]);
    is_deeply($format->{BdrStyle}, [(0) x 4]);
    is_deeply($format->{BdrColor}, [(undef) x 4]);
    is_deeply($format->{BdrDiag}, [0, 0, undef]);

    my $font = $format->{Font};
    is($font->{Name}, 'Calibri');
    { local $TODO = "defaults don't work properly yet";
    is($font->{Height}, 12);
    }
    is($font->{Color}, '#000000');
}

for my $i (1..4) {
    is($ws->get_cell(4, $i), undef);
}

{
    my $cell = $ws->get_cell(5, 0);
    is($cell->unformatted, 60);
    is($cell->value, 60);
    is($cell->type, 'Numeric');
    is($cell->{Formula}, 'SUM(A3:A5)');

    my $format = $cell->get_format;
    is($format->{AlignH}, 0);
    is($format->{AlignV}, 2);
    ok(!$format->{Wrap});
    is_deeply($format->{Fill}, [0, undef, undef]);
    is_deeply($format->{BdrStyle}, [(0) x 4]);
    is_deeply($format->{BdrColor}, [(undef) x 4]);
    is_deeply($format->{BdrDiag}, [0, 0, undef]);

    my $font = $format->{Font};
    is($font->{Name}, 'Calibri');
    { local $TODO = "defaults don't work properly yet";
    is($font->{Height}, 12);
    }
    is($font->{Color}, '#000000');
}

{
    my $cell = $ws->get_cell(5, 1);
    is($cell->unformatted, "« formula cell");
    is($cell->value, "« formula cell");
    is($cell->type, 'Text');
    is($cell->{Formula}, undef);

    my $format = $cell->get_format;
    is($format->{AlignH}, 3);
    is($format->{AlignV}, 2);
    ok(!$format->{Wrap});
    is_deeply($format->{Fill}, [1, '#EEECE1', '#FFFFFF']);
    is_deeply($format->{BdrStyle}, [(0) x 4]);
    is_deeply($format->{BdrColor}, [(undef) x 4]);
    is_deeply($format->{BdrDiag}, [0, 0, undef]);

    my $font = $format->{Font};
    is($font->{Name}, 'Calibri');
    is($font->{Height}, 12);
    is($font->{Color}, '#F79646');
}

for my $i (2..4) {
    is($ws->get_cell(5, $i), undef);
}


done_testing;



( run in 0.662 second using v1.01-cache-2.11-cpan-39bf76dae61 )