[libav-commits] fate: use diff -b in oneline comparison

Mans Rullgard git at libav.org
Tue May 15 16:26:26 CEST 2012


Module: libav
Branch: master
Commit: 0ff0af731ce4544f84b2f748dcc699717a2df8d6

Author:    Mans Rullgard <mans at mansr.com>
Committer: Mans Rullgard <mans at mansr.com>
Date:      Tue May 15 11:52:28 2012 +0100

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 at mansr.com>

---

 tests/fate-run.sh |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index a45e9a9..636fc2d 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -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(){



More information about the libav-commits mailing list