]> diplodocus.org Git - nmh/commitdiff
Set HOME in tests if unset, to avoid warning from w3m about not being
authorDavid Levine <levinedl@acm.org>
Sun, 14 Aug 2016 17:11:50 +0000 (13:11 -0400)
committerDavid Levine <david.levine@gonift.com>
Sun, 14 Aug 2016 17:14:00 +0000 (13:14 -0400)
about to create config directory.

(cherry picked from commit 30a9c9b62fa92df289079080eb5ee57d2fda3951)

test/common.sh.in

index 4635f9c..144a1be 100644 (file)
@@ -28,6 +28,13 @@ test -z "$ICONV_ENABLED"  &&  ICONV_ENABLED="@ICONV_ENABLED@"
 test -z "$OAUTH_SUPPORT"  &&  OAUTH_SUPPORT="@OAUTH_SUPPORT@"
 test -z "$CURL_USER_AGENT"  &&  CURL_USER_AGENT="@CURL_USER_AGENT@"
 
+#### If w3m is used, HOME needs to be set, assuming default w3m config.
+#### So make sure that HOME is set to avoid run-time warning about not
+#### being able to create config directory.
+test -z "$HOME"  &&  HOME=$MH_TEST_DIR
+HOME=$MH_TEST_DIR
+export HOME
+
 unset MAILDROP MHBUILD MHCONTEXT MHMTSUSERCONF MHN MHSHOW MHSTORE
 unset MHLDEBUG MHPDEBUG MHWDEBUG PAGER
 #### Set LC_ALL in individual tests as needed.  Unset these so