X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/cd6133dd23422f92534328f768a322f63a5c6dfe..886127936eae6a5bff449d797abb4e8aa10f9186:/test/common.sh.in diff --git a/test/common.sh.in b/test/common.sh.in index 936b89ad..802679a1 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 } @@ -167,7 +173,7 @@ prepare_space() { #### Optional arguments: #### 'keep first' -- first file is removed unless this is present. #### 'ignore space' -- spacing differences will not be considered -#### signficant, emulating GNU diff -w. It is assumed that the +#### significant, emulating GNU diff -w. It is assumed that the #### first file has already been run through prepare_space. #### ':' -- will print '' in the failure message, #### to make it easier to tell which of multiple tests has failed. @@ -331,6 +337,7 @@ setup_test () # clean old test data on exit trap cleanup 0 + # setup test data mkdir -p "$MH_TEST_DIR/Mail" || exit 1 cat > "$MH" <