From: Ken Hornstein Date: Wed, 18 May 2016 16:44:21 +0000 (-0400) Subject: Check to see if cross-directory links are supported; if they are not, X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/23707aaf4163c211be0a3370f24e346bf9d88d94?ds=sidebyside;hp=--cc Check to see if cross-directory links are supported; if they are not, then don't run the refile -link test. (cherry picked from commit 35fce21b692a6259138fc81caf13f4d07bb58da0) --- 23707aaf4163c211be0a3370f24e346bf9d88d94 diff --git a/test/common.sh.in b/test/common.sh.in index 936b89ad..1e93f1b0 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -138,12 +138,18 @@ check_for_hard_links () { set +e printf '' > "${MH_TEST_DIR}/$$-1" + xdir_links_supported=0 if link "${MH_TEST_DIR}/$$-1" "${MH_TEST_DIR}/$$-2" 2>/dev/null; then hard_links_supported=1 + mkdir "${MH_TEST_DIR}/xlinkdir" + if link "${MH_TEST_DIR}/$$-1" "${MH_TEST_DIR}/xlinkdir/$$-2" 2>/dev/null; then + xdir_links_supported=1 + fi else hard_links_supported=0 fi rm -f "${MH_TEST_DIR}/$$-1" "${MH_TEST_DIR}/$$-2" + rm -rf "${MH_TEST_DIR}/xlinkdir" set -e } diff --git a/test/refile/test-refile b/test/refile/test-refile index 71b2baab..64df564f 100755 --- a/test/refile/test-refile +++ b/test/refile/test-refile @@ -116,7 +116,7 @@ other+ has 1 message (1- 1). TOTAL = 11 messages in 2 folders.' check_for_hard_links -if [ $hard_links_supported -eq 1 ]; then +if [ $xdir_links_supported -eq 1 ]; then # check -link run_test 'refile 7 -src +inbox +other -link' '' run_test 'folders -noheader' \