[gnumeric] zzufit: make it possible to use fuzzxml.



commit 505d1a970096e80a7f739eb8c1358d47f118e567
Author: Morten Welinder <terra gnome org>
Date:   Wed Aug 4 11:10:48 2010 -0400

    zzufit: make it possible to use fuzzxml.

 test/fuzzxml |    5 +++--
 test/zzufit  |    8 +++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/test/fuzzxml b/test/fuzzxml
index 1ec2cdc..4d9a708 100755
--- a/test/fuzzxml
+++ b/test/fuzzxml
@@ -11,8 +11,9 @@ use Getopt::Long;
 my $base_prob = 1 / 1000;
 my $seed = undef;
 
-&GetOptions ("seed=i" => \$seed,
-	     "rate=f" => \$base_prob,
+Getopt::Long::Configure ("bundling");
+&GetOptions ("s|seed=i" => \$seed,
+	     "r|rate=f" => \$base_prob,
     );
 srand ($seed) if defined $seed;
 
diff --git a/test/zzufit b/test/zzufit
index 2c812f8..93ab58a 100755
--- a/test/zzufit
+++ b/test/zzufit
@@ -8,10 +8,12 @@ my $n = 0;
 my $rate = .0001;
 my $LOG = "zzuf.log";
 my $DIR = "zzuftmp";
+my $xml = 0;
 
 &GetOptions ("rate=f" => \$rate,
 	     "seed=i" => \$n,
 	     "victim=s" => \$file,
+	     'xml' => \$xml,
 	     )
     or die &usage (1);
 
@@ -32,7 +34,11 @@ while (1) {
     }
 
     my $zzuffile = "$DIR/${filebase}-${n}${fileext}";
-    system ("zzuf -s$n -r$rate <'$file' >'$zzuffile'");
+    if ($xml) {
+	system ("./fuzzxml -s$n -r$rate '$file' '$zzuffile'");
+    } else {
+	system ("zzuf -s$n -r$rate <'$file' >'$zzuffile'");
+    }
 
     my $outfile = "$DIR/${filebase}-${n}.gnumeric";
     system ("../src/ssconvert '$zzuffile' '$outfile' >>'$LOG' 2>&1");



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