-runtest()
-{
- testoutput=$(${MH_LIB_DIR}/ap -format "%(myhost)" ignore)
-
- if [ x"$1" != x"${testoutput}" ]; then
- echo "For $2, expected $1 but got ${testoutput}"
- exit 1
- fi
-}
-
-runtest "$(hostname)" "local hostname test"
+host=`${MH_OBJ_DIR}/test/getcanon`
+run_test "${MH_LIBEXEC_DIR}/ap -format %(myhost) ignore" "$host" \
+ "local hostname test"