summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorFL <f20@reckon.co.uk>2014-07-05 12:08:53 +0000
committerFL <f20@reckon.co.uk>2014-07-05 12:08:53 +0000
commitd72a257f454b8b1d3ad93cde2a43f37df4f2ddd7 (patch)
treee1f460bb1059f8184da8e2c8825b4ff82312bd5d /t
parentf4bed8b118ab6ebd6253f904ec98a828dbe6d259 (diff)
downloadspreadsheet-parsexlsx-d72a257f454b8b1d3ad93cde2a43f37df4f2ddd7.tar.gz
spreadsheet-parsexlsx-d72a257f454b8b1d3ad93cde2a43f37df4f2ddd7.zip
Improve locked cell detection for cells with hidden formulas. Add test for locked cell detection.
Diffstat (limited to 't')
-rw-r--r--t/bug-lock.t26
-rw-r--r--t/data/bug-lock.xlsxbin0 -> 8480 bytes
2 files changed, 26 insertions, 0 deletions
diff --git a/t/bug-lock.t b/t/bug-lock.t
new file mode 100644
index 0000000..142d003
--- /dev/null
+++ b/t/bug-lock.t
@@ -0,0 +1,26 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+use Spreadsheet::ParseXLSX;
+
+my $wb = Spreadsheet::ParseXLSX->new->parse('t/data/bug-lock.xlsx');
+my $ws = $wb->worksheet(0);
+
+my $b1 = $ws->get_cell(0, 0);
+ok($b1->get_format->{Lock});
+
+my $b2 = $ws->get_cell(1, 0);
+ok(!$b2->get_format->{Lock});
+
+my $b3 = $ws->get_cell(2, 0);
+ok($b3->get_format->{Lock});
+
+my $b4 = $ws->get_cell(3, 0);
+ok(!$b4->get_format->{Lock});
+
+my $b5 = $ws->get_cell(4, 0);
+ok($b5->get_format->{Lock});
+
+done_testing;
diff --git a/t/data/bug-lock.xlsx b/t/data/bug-lock.xlsx
new file mode 100644
index 0000000..bf16fdb
--- /dev/null
+++ b/t/data/bug-lock.xlsx
Binary files differ