]> git.marmaro.de Git - mmh/blobdiff - test/format/test-mymbox
Default to fcntl locking for AIX, Cygwin, and Linux. Without it
[mmh] / test / format / test-mymbox
index e3decd99f37e2a208eaddb213927ba9fc9d754fa..39ab4c11012fca3d24013ec91a748def577672c6 100755 (executable)
@@ -13,8 +13,8 @@ fi
 
 setup_test
 
 
 setup_test
 
-user="`id -un`"
-host="`hostname`"
+user=${LOGNAME:-`id -un`}
+host=`${MH_OBJ_DIR}/test/getfqdn`
 
 run_test "${MH_LIB_DIR}/ap -format %(mymbox{text}) ${user}" \
          1 "Basic user test"
 
 run_test "${MH_LIB_DIR}/ap -format %(mymbox{text}) ${user}" \
          1 "Basic user test"
@@ -25,6 +25,10 @@ run_test "${MH_LIB_DIR}/ap -format %(mymbox{text}) nosuchuser@nosuchhost.blah" \
 
 myname="Random User <random@user.something.com>"
 
 
 myname="Random User <random@user.something.com>"
 
+#### Remove existing Local-Mailbox: profile component, if any.  Then
+#### add one.
+grep -v 'Local-Mailbox: ' ${MH} > ${MH}.new
+mv -f ${MH}.new ${MH}
 echo "Local-Mailbox: ${myname}" >> ${MH}
 
 run_test "echo `${MH_LIB_DIR}/ap -format '%(mymbox{text})' "${myname}"`" \
 echo "Local-Mailbox: ${myname}" >> ${MH}
 
 run_test "echo `${MH_LIB_DIR}/ap -format '%(mymbox{text})' "${myname}"`" \