diff options
author | Jesse Luehrs <doy@tozt.net> | 2016-05-23 02:52:57 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2016-05-23 02:55:15 -0400 |
commit | a1f317917775f7d286d9d22e8387b5c2f0396e96 (patch) | |
tree | 02eb2cf78004cf03647012af58fb3736e9419450 /t | |
parent | 9567810993977aa8dced1da8c650102352a4d49b (diff) | |
download | spreadsheet-parsexlsx-a1f317917775f7d286d9d22e8387b5c2f0396e96.tar.gz spreadsheet-parsexlsx-a1f317917775f7d286d9d22e8387b5c2f0396e96.zip |
add rich text support (Carlos Alberto Danzos)
Diffstat (limited to 't')
-rw-r--r-- | t/rich.t | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/rich.t b/t/rich.t new file mode 100644 index 0000000..f7b957e --- /dev/null +++ b/t/rich.t @@ -0,0 +1,21 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More; + +use Spreadsheet::ParseXLSX; + +my $wb = Spreadsheet::ParseXLSX->new->parse('t/data/bug-11.xlsx'); +is($wb->worksheet_count, 1); + +my $ws = $wb->worksheet(0); +is($ws->get_cell(0, 0)->value, "foobarbaz"); +my $rich_text_data = $ws->get_cell(0, 0)->get_rich_text; +is($rich_text_data->[0][0], 0); +ok(!$rich_text_data->[0][1]->{Italic}); +is($rich_text_data->[1][0], 3); +ok($rich_text_data->[1][1]->{Italic}); +is($rich_text_data->[2][0], 6); +ok(!$rich_text_data->[2][1]->{Italic}); + +done_testing; |