]>
diplodocus.org Git - nmh/blob - test/format/test-myhost
d303a8f2f47604026df9bd72f587369e19522d62
3 # Test that the %(myhost) function returns the local hostname and
4 # the localname entry out of the mts configuration file.
7 if [ -z "${MH_TEST_COMMON}" ]; then
8 echo "MH_TEST_COMMON not set; try running via 'make check'"
17 testoutput
=$
(${MH_LIB_DIR}/ap
-format "%(myhost)" ignore
)
19 if [ x
"$1" != x
"${testoutput}" ]; then
20 echo "For $2, expected $1 but got ${testoutput}"
25 runtest
"$(hostname)" "local hostname test"
27 cp ${MHMTSCONF} ${MH_TEST_DIR}/Mail
/mts.conf
|| exit 1
28 export MHMTSCONF
="${MH_TEST_DIR}/Mail/mts.conf"
30 echo "localname: some.random.name" >> ${MHMTSCONF}
32 runtest
"some.random.name" "mts.conf localname test"