Introspection: add col/row manipulations
[gnumeric.git] / test / t6516-graph.pl
blobc5575f5543c1858f184670238e8f61ddde1d1cf6
1 #!/usr/bin/perl -w
2 # -----------------------------------------------------------------------------
4 use strict;
5 use lib ($0 =~ m|^(.*/)| ? $1 : ".");
6 use GnumericTest;
8 my $file = "$samples/graph-tests.gnumeric";
9 $GnumericTest::default_subtests = '*,-biff7';
12 if (&subtest ("gnumeric")) {
13 &message ("Check graph gnumeric roundtrip.");
14 &test_roundtrip ($file,
15 'format' => 'Gnumeric_XmlIO:sax',
16 'ext' => "gnm");
19 if (&subtest ("ods")) {
20 &message ("Check graph ods roundtrip.");
21 &test_roundtrip ($file,
22 'format' => 'Gnumeric_OpenCalc:odf',
23 'ext' => "ods",
24 'filter2' => 'std:drop_generator',
25 'ignore_failure' => 1);
28 if (&subtest ("biff7")) {
29 # We don't save graphs, so don't test.
30 &message ("Check graph xls/BIFF7 roundtrip.");
31 &test_roundtrip ($file,
32 'format' => 'Gnumeric_Excel:excel_biff7',
33 'ext' => "xls",
34 'resize' => '16384x256',
35 'filter2' => 'std:drop_codepage');
38 # Point size isn't important.
39 my $xls_drop_pts_size = "$PERL -p -e '\$_ = \"\" if m{^\\s*<property name=\"(width|height)-pts\">[0-9.]+</property>\\s*}'";
41 my $xls_missing_marker_shapes = "$PERL -p -e 's/\\bshape=\"(hourglass|butterfly|lefthalf-bar)\"/shape=\"square\"/; s/\\bshape=\"triangle-(down|left|right)\"/shape=\"triangle-up\"/;'";
43 if (&subtest ("biff8")) {
44 &message ("Check graph xls/BIFF8 roundtrip.");
45 &test_roundtrip ($file,
46 'format' => 'Gnumeric_Excel:excel_biff8',
47 'ext' => "xls",
48 'filter1' => "$xls_drop_pts_size | $xls_missing_marker_shapes",
49 'filter2' => 'std:drop_codepage',
50 'ignore_failure' => 1);
53 if (&subtest ("xlsx")) {
54 &message ("Check graph xlsx roundtrip.");
55 &test_roundtrip ($file,
56 'format' => 'Gnumeric_Excel:xlsx',
57 'ext' => "xlsx",
58 'resize' => '1048576x16384',
59 'filter1' => $xls_drop_pts_size,
60 'ignore_failure' => 1);