summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/helper.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/helper.sh b/test/helper.sh
index 86ff989..d26749c 100644
--- a/test/helper.sh
+++ b/test/helper.sh
@@ -9,6 +9,14 @@ export RCM_LIB="$TESTDIR/../share"
mkdir .dotfiles
+hostname() {
+ if [ -n "$HOSTNAME" ]; then
+ echo "$HOSTNAME"
+ else
+ command hostname | sed -e 's/\..*//'
+ fi
+}
+
assert() {
local msg="$1"; shift