From 9fb253388b08d53ab64e96d77857b7e51fcf4502 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 28 Apr 2005 08:20:33 +0000 Subject: [PATCH] if diff -u makes zero output, try diff -c instead --- tests/getpart.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/getpart.pm b/tests/getpart.pm index 898ecec6b..d1c8ec856 100644 --- a/tests/getpart.pm +++ b/tests/getpart.pm @@ -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; }