File: 11_call.t

package info (click to toggle)
libspreadsheet-read-perl 0.54-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 624 kB
  • ctags: 51
  • sloc: perl: 2,868; lisp: 293; makefile: 11; xml: 1
file content (38 lines) | stat: -rw-r--r-- 891 bytes parent folder | download | duplicates (5)
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
34
35
36
37
38
#!/usr/bin/perl

use strict;
use warnings;

use Test::More;
use Test::NoWarnings;

use Spreadsheet::Read;
    Spreadsheet::Read::parses ("sc") or
	plan skip_all => "No SquirelCalc parser found";

plan tests => 81;

# Base attributes
foreach my $onoff (0, 1) {
    for (   [ ],
	    [ rc   => $onoff ],
	    [ cell => $onoff ],
	    [ rc   => 0, cell => $onoff ],
	    [ rc   => 1, cell => $onoff ],
	    [ clip => $onoff ],
	    [ cell => 0, clip => $onoff ],
	    [ cell => 1, clip => $onoff ],
	    [ attr => $onoff ],
	    [ cell => 0, attr => $onoff ],
	    ) {
	my $ref = ReadData ("files/test.sc", @$_);
	ok ($ref, "Open with options (@$_)");
	ok (ref $ref, "Valid ref");
	   $ref = ReadData ("files/test.sc", { @$_ });
	ok ($ref, "Open with options {@$_}");
	ok (ref $ref, "Valid ref");
	}
    }

# TODO: test and catch unsupported option.
#       Currently they are silently ignored