]> diplodocus.org Git - nmh/blobdiff - test/common.sh.in
Added context_find_prefix().
[nmh] / test / common.sh.in
index 0aee867c01b656d6e3cefb5cc4f1250b36331c3b..74e5f63256d52a6f18a691738e79d9776e564aa3 100644 (file)
@@ -135,12 +135,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
 }
@@ -164,7 +170,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.
 ####   ':' <test name> -- will print '<test name>' in the failure message,
 ####        to make it easier to tell which of multiple tests has failed.