From c7fc2031c64d8430bebffff7d4c67da94bb5eef9 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Sat, 10 Aug 2013 10:06:33 -0700 Subject: [PATCH] Testall: Diagnotic message for missing shells --- test/testall | 5 ++++- test/tests/loader | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/testall b/test/testall index 21b6765..865fc9a 100755 --- a/test/testall +++ b/test/testall @@ -1,10 +1,13 @@ #!/usr/bin/env sh . "$(readlink -f $(dirname $(readlink -f $HOME/.xinitrc))/../)/test/lib" run_test () { - export RUNNING_SHELL="$(basename "$(readlink -f "$(which "$1")")")" + export RUNNING_SHELL="$(basename "$(readlink -f "$(which "$1" 2>/dev/null)")")" if path_hasbin $1; then $1 $(dirname "$0")/test echo "" + else + echo "$1: Shell was not found" + echo "" fi } run_test bash diff --git a/test/tests/loader b/test/tests/loader index 9ffffa7..2109218 100644 --- a/test/tests/loader +++ b/test/tests/loader @@ -52,3 +52,8 @@ test_array_forall_efail () { test_seq "123" "$FAIL" } test_register test_array_forall_efail + +test_dir_conf () { + [ "$(readlink -f ..)" = "$(dir_conf)" ] +} +test_register test_dir_conf