From 23707aaf4163c211be0a3370f24e346bf9d88d94 Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Wed, 18 May 2016 12:44:21 -0400 Subject: [PATCH] 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) --- test/common.sh.in | 6 ++++++ test/refile/test-refile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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' \ -- 2.56.0