--- /dev/null
+#!/bin/sh
+
+testname=`basename "$0"`
+test_description="Check that dependencies have correct relative path after cd"
+. $SHARNESS_TEST_SRCDIR/sharness.sh
+export REDO_TOP_DIR="`pwd`" REDO_NO_PROGRESS=1
+
+cat > our <<EOF
+a/b/c.d.do
+a/b/default.d.do
+a/b/default.do
+a/default.d.do
+a/default.do
+default.d.do
+default.do
+EOF
+touch default.do
+redo-whichdo a/b/c.d > their
+test_expect_success expected "cmp --silent our their"
+
+test_done