[gnumeric] zzufit: add new --ods.



commit adca9eec0025c36618e0affffb9b96220a9fa5ea
Author: Morten Welinder <terra gnome org>
Date:   Wed Aug 11 14:43:36 2010 -0400

    zzufit: add new --ods.

 test/ChangeLog |    1 +
 test/zzufit    |    9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/test/ChangeLog b/test/ChangeLog
index c7fcdfd..2dca475 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,5 +1,6 @@
 2010-08-11  Morten Welinder  <terra gnome org>
 
+	* test/zzufit: Add new --ods option.
 	* fuzzzip: New fuzzer that works inside zip files.
 
 2010-08-06  Morten Welinder  <terra gnome org>
diff --git a/test/zzufit b/test/zzufit
index 432a691..81ac0bc 100755
--- a/test/zzufit
+++ b/test/zzufit
@@ -9,14 +9,19 @@ my $rate = .0001;
 my $LOG = "zzuf.log";
 my $DIR = "zzuftmp";
 my $xml = 0;
+my $ods = 0;
 
 &GetOptions ("rate=f" => \$rate,
 	     "seed=i" => \$n,
 	     "victim=s" => \$file,
 	     'xml' => \$xml,
+	     'ods' => \$ods,
 	     )
     or die &usage (1);
 
+die "$0: Only one of --xml and --ods may be specified.\n"
+    if $xml + $ods > 1;
+
 if (!-d $DIR) {
     mkdir ($DIR, 0777) or die "$0: Cannot create $DIR: $!\n";
 }
@@ -36,7 +41,9 @@ while (1) {
     my $zzuffile = "$DIR/${filebase}-${n}${fileext}";
     my $fuzzcmd = $xml
 	? "./fuzzxml -s$n -r$rate '$file' '$zzuffile'"
-	: "zzuf -s$n -r$rate <'$file' >'$zzuffile'";
+	: ($ods
+	   ? "./fuzzzip --subfuzzer='./fuzzxml -s$n -r$rate %i %o' --subfile content.xml --subfile styles.xml '$file' '$zzuffile'"
+	   : "zzuf -s$n -r$rate <'$file' >'$zzuffile'");
     &append_log ("Fuzz command $fuzzcmd\n");
     system ($fuzzcmd);
 



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