]> ruderich.org/simon Gitweb - coloredstderr/coloredstderr.git/blobdiff - tests/run.sh
tests: Fix tests when running under coloredstderr.
[coloredstderr/coloredstderr.git] / tests / run.sh
index b57122cee2c4bf98f140707161cb950fdcfd44d6..ee26896c7bc12465d749b13cf330749cefe34b7a 100755 (executable)
 set -e
 
 
+# The tests fail if running under coloredstderr because the tests redirect
+# stderr to stdout which is detected by coloredstderr :D (and not colored as a
+# result). Therefore remove LD_PRELOAD and re-exec the test.
+if test -n "$LD_PRELOAD"; then
+    unset LD_PRELOAD
+    exec "$0"
+fi
+
 test "x$srcdir" = x && srcdir=.
 . "$srcdir/lib.sh"