Browse code

fate: use diff -b in oneline comparison

This is simpler and should take care of any problems with mixed
line ending styles.

Signed-off-by: Mans Rullgard <mans@mansr.com>

Mans Rullgard authored on 2012/05/15 19:52:28
Showing 1 changed files
... ...
@@ -61,9 +61,7 @@ stddev(){
61 61
 }
62 62
 
63 63
 oneline(){
64
-    val=$(cat "$2")
65
-    test x"$val" = x"$1" || { r=$?; printf -- '-%s\n+%s\n' "$ref" "$val"; }
66
-    return ${r:-0}
64
+    printf '%s\n' "$1" | diff -u -b - "$2"
67 65
 }
68 66
 
69 67
 run(){