File: 14-no-settings.t

package info (click to toggle)
libspreadsheet-readsxc-perl 0.39-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,368 kB
  • sloc: perl: 1,377; makefile: 8; xml: 2
file content (33 lines) | stat: -rw-r--r-- 768 bytes parent folder | download | duplicates (3)
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
32
33
use strict;
use Test::More;
use File::Basename 'dirname';
use Spreadsheet::ParseODS;

my $d = dirname($0);

plan tests => 2;

# Only run these tests locally
my $resource_intensive_tests = ($ENV{LOGNAME} || '') eq 'corion'
                            && ($ENV{DISPLAY} || $^O =~ /mswin/i);

if(! $resource_intensive_tests) {
    SKIP: {
        skip "This test needs lots of memory", 2;
    };
    exit;
};

my $workbook;
my $ok = eval {
    $workbook = Spreadsheet::ParseODS->new(
        #readonly => 1,
    )->parse("$d/20200617_Testnummers_inclusief_omnummertabel_GBA-V.ods",
        readonly => 1
    );
    1;
};

is $ok, 1, "We don't crash when parsing the workbook"
    or diag $@;
ok $workbook->worksheet('Toelichting'), 'We find the worksheet "Toelichting"';