[ostree] tests: Output errors to stderr, so they show up under "prove"



commit dd37e46172bab510569dcb92180c3dcc02dea16d
Author: Colin Walters <walters verbum org>
Date:   Fri Nov 4 12:31:40 2011 -0400

    tests: Output errors to stderr, so they show up under "prove"

 tests/libtest.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/libtest.sh b/tests/libtest.sh
index 1c4ccc5..a747019 100644
--- a/tests/libtest.sh
+++ b/tests/libtest.sh
@@ -36,22 +36,22 @@ die () {
 }
 
 assert_streq () {
-    test "$1" = "$2" || (echo "$1 != $2"; exit 1)
+    test "$1" = "$2" || (echo 1>&2 "$1 != $2"; exit 1)
 }
 
 assert_has_file () {
-    test -f "$1" || (echo "Couldn't find '$1'"; exit 1)
+    test -f "$1" || (echo 1>&2 "Couldn't find '$1'"; exit 1)
 }
 
 assert_not_has_file () {
     if test -f "$1"; then
-	echo "File '$1' exists"; exit 1
+	echo 1>&2 "File '$1' exists"; exit 1
     fi
 }
 
 assert_file_has_content () {
     if ! grep -q "$2" "$1"; then
-	echo "File '$1' doesn't match regexp '$2'"; exit 1
+	echo 1>&2 "File '$1' doesn't match regexp '$2'"; exit 1
     fi
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]