if diff -u makes zero output, try diff -c instead
authorDaniel Stenberg <daniel@haxx.se>
Thu, 28 Apr 2005 08:20:33 +0000 (08:20 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 28 Apr 2005 08:20:33 +0000 (08:20 +0000)
tests/getpart.pm

index 898ecec..d1c8ec8 100644 (file)
@@ -220,7 +220,11 @@ sub showdiff {
         print TEMP $_;
     }
     close(TEMP);
-    my @out = `diff -u $file2 $file1`;
+    my @out = `diff -u $file2 $file1 2>/dev/null`;
+
+    if(!$out[0]) {
+       @out = `diff -c $file2 $file1 2>/dev/null`;
+    }
 
     return @out;
 }