t: branch: fix broken && chains
[gitweb.git] / t / t1504-ceiling-dirs.sh
index cce87a5ab523d3a4232e9e11863aa3a6e8ca0211..3d51615e42d53a0c7794533eb27049606981fbf3 100755 (executable)
@@ -44,6 +44,10 @@ test_prefix ceil_at_sub ""
 GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/"
 test_prefix ceil_at_sub_slash ""
 
+if test_have_prereq SYMLINKS
+then
+       ln -s sub top
+fi
 
 mkdir -p sub/dir || exit 1
 cd sub/dir || exit 1
@@ -68,6 +72,19 @@ test_fail subdir_ceil_at_sub
 GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/"
 test_fail subdir_ceil_at_sub_slash
 
+if test_have_prereq SYMLINKS
+then
+       GIT_CEILING_DIRECTORIES="$TRASH_ROOT/top"
+       test_fail subdir_ceil_at_top
+       GIT_CEILING_DIRECTORIES="$TRASH_ROOT/top/"
+       test_fail subdir_ceil_at_top_slash
+
+       GIT_CEILING_DIRECTORIES=":$TRASH_ROOT/top"
+       test_prefix subdir_ceil_at_top_no_resolve "sub/dir/"
+       GIT_CEILING_DIRECTORIES=":$TRASH_ROOT/top/"
+       test_prefix subdir_ceil_at_top_slash_no_resolve "sub/dir/"
+fi
+
 GIT_CEILING_DIRECTORIES="$TRASH_ROOT/sub/dir"
 test_prefix subdir_ceil_at_subdir "sub/dir/"