Skip to content

Commit

Permalink
Testall: Diagnotic message for missing shells
Browse files Browse the repository at this point in the history
  • Loading branch information
wkennington committed Aug 10, 2013
1 parent 56b72ef commit c7fc203
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/testall
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 5 additions & 0 deletions test/tests/loader
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c7fc203

Please sign in to comment.