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 26 27 28 29 30 31
|
Description: remove test excel file at the end of tests
Origin: vendor
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2016-04-16
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=113827
Bug: https://rt.cpan.org/Ticket/Display.html?id=113827
--- a/t/02.t
+++ b/t/02.t
@@ -10,7 +10,8 @@ plan tests => 2;
use strict;
use Spreadsheet::ParseExcel::Simple;
-my $workbook = Spreadsheet::WriteExcel->new("test.xls");
+my $filename = 'test.xls';
+my $workbook = Spreadsheet::WriteExcel->new($filename);
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
@@ -21,8 +22,10 @@ $worksheet2->write('A2', 'Hello');
$workbook->close();
-my $xls = Spreadsheet::ParseExcel::Simple->read('test.xls');
+my $xls = Spreadsheet::ParseExcel::Simple->read($filename);
for my $sheet ($xls->sheets) {
ok $sheet->has_data, "Sheet $sheet->{sheet}->{Name} has data";
}
+
+unlink($filename);
|