+mkdir "$testdir"
+cd "$testdir"
+#
+# Provoke failure.
+run_sbcl <<EOF
+(let ((rel-name #p"foo/bar/")
+ (abs-name (merge-pathnames #p"baz/quux/" (truename "."))))
+ (and
+ (equalp (ensure-directories-exist abs-name) abs-name)
+ (equalp (ensure-directories-exist rel-name) rel-name)
+ (sb-ext:quit :unix-status 52)))
+EOF
+check_status_maybe_lose "ENSURE-DIRECTORIES-EXIST" $?
+if [ ! -d "$testdir/foo/bar" ] ; then
+ echo test failed: "$testdir/foo/bar" is not a directory
+ find "$testdir" -print
+ exit 1
+fi;
+if [ ! -d "$testdir/baz/quux" ] ; then
+ echo test failed: "$testdir/baz/quux" is not a directory
+ find "$testdir" -print
+ exit 1
+fi;
+#
+# We succeeded, life is good. Now we don't need the test directory
+# any more; and come back home.
+cd "$SBCL_PWD"
+rm -r "$testdir"