[gnumeric] t2005: new test for dependency tracking.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] t2005: new test for dependency tracking.
- Date: Sun, 12 Jul 2020 22:24:40 +0000 (UTC)
commit ad22b12f2304e60606e3254cc028ef484b81c5ef
Author: Morten Welinder <terra gnome org>
Date: Sun Jul 12 18:24:16 2020 -0400
t2005: new test for dependency tracking.
test/Makefile.am | 1 +
test/t2005-recalc.pl | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+)
---
diff --git a/test/Makefile.am b/test/Makefile.am
index dfd2b2182..22f6a1fc6 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -68,6 +68,7 @@ TESTS = t1000-statfuns.pl \
t2002-nonascii-numbers.pl \
t2003-random-generators.pl \
t2004-insdel-colrow.pl \
+ t2005-recalc.pl \
t2800-style-optimizer.pl \
t5800-csv-date.pl \
t5801-csv-number.pl \
diff --git a/test/t2005-recalc.pl b/test/t2005-recalc.pl
new file mode 100755
index 000000000..404073f6a
--- /dev/null
+++ b/test/t2005-recalc.pl
@@ -0,0 +1,67 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+&message ("Check that dependency tracking works.");
+
+$GnumericTest::default_corpus = 'random:20';
+my @sources = &GnumericTest::corpus();
+# Must avoid volatile functions
+@sources = grep {
!m{(^|/)(chart-tests\.gnumeric|datefuns\.xls|vba-725220\.xls|docs-samples\.gnumeric|numbermatch\.gnumeric)$}
} @sources;
+# Avoid slow stuff
+@sources = grep { !m{(^|/)(address\.xls|bitwise\.xls|operator\.xls|linest\.xls)$} } @sources;
+@sources = grep { !m{(^|/)(amath\.gnumeric|gamma\.gnumeric|crlibm\.gnumeric)$} } @sources;
+@sources = grep { !m{(^|/)(numtheory\.gnumeric)$} } @sources;
+# Currently fails, dending investigation
+@sources = grep { !m{(^|/)(arrays\.xls)$} } @sources;
+
+
+my $nskipped = 0;
+my $ngood = 0;
+my $nbad = 0;
+
+foreach my $src (@sources) {
+ if (!-r $src) {
+ $nskipped++;
+ next;
+ }
+
+ print STDERR "Checking $src\n";
+
+ my $cmd = &GnumericTest::quotearg ($sstest, 'test_recalc', $src);
+ my $actual = `$cmd 2>&1`;
+ my $err = $?;
+ if ($err) {
+ $nbad++;
+ next;
+ }
+
+ if ($actual =~ /^Changing the contents of \d+ cells, one at a time\.\.\.$/) {
+ $ngood++;
+ next;
+ }
+
+ my @lines = split ("\n", $actual);
+ my $toolong = (@lines > 25);
+ splice @lines, 25 if $toolong;
+ foreach (@lines) {
+ print "| $_\n";
+ }
+ print "...\n" if $toolong;
+ $nbad++;
+}
+
+&GnumericTest::report_skip ("No source files present") if $nbad + $ngood == 0;
+
+if ($nskipped > 0) {
+ print STDERR "$nskipped files skipped.\n";
+}
+
+if ($nbad > 0) {
+ die "Fail\n";
+} else {
+ print STDERR "Pass\n";
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]