[gnumeric] t6050: use new utility functions.



commit aa0840522f9a43cd08c217095a1c3055af17697f
Author: Morten Welinder <terra gnome org>
Date:   Wed Mar 5 18:08:31 2014 -0500

    t6050: use new utility functions.

 test/ChangeLog              |    4 ++++
 test/t6050-vba-roundtrip.pl |   10 ++++------
 2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/test/ChangeLog b/test/ChangeLog
index ed2a71d..4d23538 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2014-03-05  Morten Welinder <terra gnome org>
+
+       * t6050-vba-roundtrip.pl: Use new GnumericTest::find_program
+
 2014-03-03  Morten Welinder <terra gnome org>
 
        * Release 1.12.12
diff --git a/test/t6050-vba-roundtrip.pl b/test/t6050-vba-roundtrip.pl
index 539b217..8308ad3 100755
--- a/test/t6050-vba-roundtrip.pl
+++ b/test/t6050-vba-roundtrip.pl
@@ -10,9 +10,7 @@ use GnumericTest;
 my $src = "$samples/vba-725220.xls";
 &GnumericTest::report_skip ("file $src does not exist") unless -r $src;
 
-my $gsfhelp = `gsf help 2>&1`;
-&GnumericTest::report_skip ("gsf is not available")
-    unless ($gsfhelp || '') =~ /\bcat\b/;
+my $gsf = &GnumericTest::find_program ("gsf");
 
 my $dir1 = &gsf_list ($src);
 
@@ -34,8 +32,8 @@ foreach my $f (sort keys %$dir1) {
     } elsif ($dir1->{$f} ne $dir2->{$f}) {
        die "$0: member $fprint changed length during conversion.\n";
     } else {
-       my $d1 = `gsf cat '$src' '$f'`;
-       my $d2 = `gsf cat '$tmp' '$f'`;
+       my $d1 = `$gsf cat '$src' '$f'`;
+       my $d2 = `$gsf cat '$tmp' '$f'`;
        if (length ($d1) ne $dir1->{$f}) {
            print "Member $fprint is strange\n";
        } elsif ($d1 eq $d2) {
@@ -51,7 +49,7 @@ sub gsf_list {
 
     my $dir = {};
     local (*FIL);
-    open (FIL, "gsf list '$fn' | ") or die "Cannot parse $fn: $!\n";
+    open (FIL, "$gsf list '$fn' | ") or die "Cannot parse $fn: $!\n";
     while (<FIL>) {
        next unless /^f\s.*\s(\d+)\s+(.*)$/;
        $dir->{$2} = $1;


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