fate: use diff -b in oneline comparison
authorMans Rullgard <mans@mansr.com>
Tue, 15 May 2012 10:52:28 +0000 (11:52 +0100)
committerMans Rullgard <mans@mansr.com>
Tue, 15 May 2012 14:23:34 +0000 (15:23 +0100)
This is simpler and should take care of any problems with mixed
line ending styles.

Signed-off-by: Mans Rullgard <mans@mansr.com>
tests/fate-run.sh

index a45e9a9..636fc2d 100755 (executable)
@@ -61,9 +61,7 @@ stddev(){
 }
 
 oneline(){
-    val=$(cat "$2")
-    test x"$val" = x"$1" || { r=$?; printf -- '-%s\n+%s\n' "$ref" "$val"; }
-    return ${r:-0}
+    printf '%s\n' "$1" | diff -u -b - "$2"
 }
 
 run(){