[gnumeric] tests: new tests for ods.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] tests: new tests for ods.
- Date: Wed, 21 Mar 2012 15:40:33 +0000 (UTC)
commit 9d8c9b3d1130be90d91148bf7f222bc45b1afe88
Author: Morten Welinder <terra gnome org>
Date: Wed Mar 21 11:40:18 2012 -0400
tests: new tests for ods.
NEWS | 1 +
test/ChangeLog | 6 ++++++
test/GnumericTest.pm | 2 ++
test/t6004-finfuns.pl | 9 +++++++++
test/t6100-statfuns-ods.pl | 19 +++++++++++++++++++
test/t6101-mathfuns-ods.pl | 19 +++++++++++++++++++
test/t6102-objs-ods.pl | 19 +++++++++++++++++++
test/t6103-lookfuns-ods.pl | 19 +++++++++++++++++++
test/t6104-finfuns-ods.pl | 19 +++++++++++++++++++
9 files changed, 113 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index cb38337..df04905 100644
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,7 @@ Morten:
* Inhibit typing underline style in format dialog.
* Allow pattern matching for VLOOKUP/HLOOKUP. [#672319]
* Fix pattern matching for VLOOKUP/HLOOKUP/MATCH.
+ * Improve test suite for ods.
--------------------------------------------------------------------------
Gnumeric 1.11.2
diff --git a/test/ChangeLog b/test/ChangeLog
index 6eea212..71e928b 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-21 Morten Welinder <terra gnome org>
+
+ * GnumericTest.pm (test_exporter): Skip if file doesn't exist.
+
+ * t6000, t610[0-4]: new tests.
+
2012-03-14 Morten Welinder <terra gnome org>
* t6000-statfuns.pl, t6001-mathfuns.pl, t6002-objs.pl,
diff --git a/test/GnumericTest.pm b/test/GnumericTest.pm
index 7a6f5fb..a7a630f 100644
--- a/test/GnumericTest.pm
+++ b/test/GnumericTest.pm
@@ -313,6 +313,8 @@ sub test_importer {
sub test_exporter {
my ($file) = @_;
+ &report_skip ("file $file does not exist") unless -r $file;
+
my $tmp = fileparse ($file);
$tmp =~ s/\.([a-zA-Z0-9]+)$// or die "Must have extension for export test.";
my $ext = $1;
diff --git a/test/t6004-finfuns.pl b/test/t6004-finfuns.pl
new file mode 100755
index 0000000..81a57de
--- /dev/null
+++ b/test/t6004-finfuns.pl
@@ -0,0 +1,9 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+&message ("Check the xls exporter.");
+&test_exporter ("$samples/excel/finfuns.xls");
diff --git a/test/t6100-statfuns-ods.pl b/test/t6100-statfuns-ods.pl
new file mode 100755
index 0000000..edb09ab
--- /dev/null
+++ b/test/t6100-statfuns-ods.pl
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+&message ("Check the ods exporter.");
+
+my $src = "$samples/excel/statfuns.xls";
+&report_skip ("file $src does not exist") unless -r $src;
+
+my $tmp = $src;
+$tmp =~ s|^.*/||;
+$tmp =~ s|\..*|.ods|;
+&GnumericTest::junkfile ($tmp);
+system ("$ssconvert $src $tmp");
+
+&test_exporter ($tmp);
diff --git a/test/t6101-mathfuns-ods.pl b/test/t6101-mathfuns-ods.pl
new file mode 100755
index 0000000..40cf0fd
--- /dev/null
+++ b/test/t6101-mathfuns-ods.pl
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+&message ("Check the ods exporter.");
+
+my $src = "$samples/excel/mathfuns.xls";
+&report_skip ("file $src does not exist") unless -r $src;
+
+my $tmp = $src;
+$tmp =~ s|^.*/||;
+$tmp =~ s|\..*|.ods|;
+&GnumericTest::junkfile ($tmp);
+system ("$ssconvert $src $tmp");
+
+&test_exporter ($tmp);
diff --git a/test/t6102-objs-ods.pl b/test/t6102-objs-ods.pl
new file mode 100755
index 0000000..7e1c066
--- /dev/null
+++ b/test/t6102-objs-ods.pl
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+&message ("Check the ods exporter.");
+
+my $src = "$samples/excel/objs.xls";
+&report_skip ("file $src does not exist") unless -r $src;
+
+my $tmp = $src;
+$tmp =~ s|^.*/||;
+$tmp =~ s|\..*|.ods|;
+&GnumericTest::junkfile ($tmp);
+system ("$ssconvert $src $tmp");
+
+&test_exporter ($tmp);
diff --git a/test/t6103-lookfuns-ods.pl b/test/t6103-lookfuns-ods.pl
new file mode 100755
index 0000000..8d3e0dc
--- /dev/null
+++ b/test/t6103-lookfuns-ods.pl
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+&message ("Check the ods exporter.");
+
+my $src = "$samples/excel/lookfuns.xls";
+&report_skip ("file $src does not exist") unless -r $src;
+
+my $tmp = $src;
+$tmp =~ s|^.*/||;
+$tmp =~ s|\..*|.ods|;
+&GnumericTest::junkfile ($tmp);
+system ("$ssconvert $src $tmp");
+
+&test_exporter ($tmp);
diff --git a/test/t6104-finfuns-ods.pl b/test/t6104-finfuns-ods.pl
new file mode 100755
index 0000000..525249c
--- /dev/null
+++ b/test/t6104-finfuns-ods.pl
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+&message ("Check the ods exporter.");
+
+my $src = "$samples/excel/finfuns.xls";
+&report_skip ("file $src does not exist") unless -r $src;
+
+my $tmp = $src;
+$tmp =~ s|^.*/||;
+$tmp =~ s|\..*|.ods|;
+&GnumericTest::junkfile ($tmp);
+system ("$ssconvert $src $tmp");
+
+&test_exporter ($tmp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]