[gnumeric] tests: fix determinism test



commit 993c5ae8feec12463dfabde68a803a256007127b
Author: Morten Welinder <terra gnome org>
Date:   Wed May 21 22:44:49 2014 -0400

    tests: fix determinism test

 test/t6150-ods-syntax.pl        |    2 +-
 test/t6152-xlsx-syntax.pl       |    2 +-
 test/t6160-ods-deterministic.pl |    6 ++++--
 3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/test/t6150-ods-syntax.pl b/test/t6150-ods-syntax.pl
index 79b0e94..1132375 100755
--- a/test/t6150-ods-syntax.pl
+++ b/test/t6150-ods-syntax.pl
@@ -96,7 +96,7 @@ foreach my $src (@sources) {
     my %members;
     foreach (`$unzip -v $tmp`) {
        next unless /^----/ ... /^----/;
-       next unless m{\s(\S+)$};
+       next unless m{^\s*\d.*\s(\S+)$};
        my $member = $1;
        if (exists $members{$member}) {
            print STDERR "Duplicate member $member\n";
diff --git a/test/t6152-xlsx-syntax.pl b/test/t6152-xlsx-syntax.pl
index a9ee515..2ec724b 100755
--- a/test/t6152-xlsx-syntax.pl
+++ b/test/t6152-xlsx-syntax.pl
@@ -102,7 +102,7 @@ foreach my $src (@sources) {
     my %members;
     foreach (`$unzip -v $tmp`) {
        next unless /^----/ ... /^----/;
-       next unless m{\s(\S+)$};
+       next unless m{^\s*\d.*\s(\S+)$};
        my $member = $1;
        if (exists $members{$member}) {
            print STDERR "Duplicate member $member\n";
diff --git a/test/t6160-ods-deterministic.pl b/test/t6160-ods-deterministic.pl
index 2061495..7c07d82 100755
--- a/test/t6160-ods-deterministic.pl
+++ b/test/t6160-ods-deterministic.pl
@@ -94,7 +94,7 @@ foreach my $src (@sources) {
 
        foreach (`$unzip -v $tmp`) {
            next unless /^----/ ... /^----/;
-           next unless m{\s(\S+)$};
+           next unless m{^\s*\d.*\s(\S+)$};
            my $member = $1;
            if (($members{$member} || 0) & $i) {
                print STDERR "Duplicate member $member\n";
@@ -104,7 +104,6 @@ foreach my $src (@sources) {
        }
 
        push @tmp, $tmp;
-       &GnumericTest::removejunk ($tmp);
     }
 
     my $tmp1 = $tmp[0];
@@ -133,6 +132,9 @@ foreach my $src (@sources) {
 
        $ngood++;
     }
+
+    &GnumericTest::removejunk ($tmp1);
+    &GnumericTest::removejunk ($tmp2);
 }
 
 &GnumericTest::report_skip ("No source files present") if $nbad + $ngood == 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]