3 test_description
='cd_to_toplevel'
7 test_cd_to_toplevel
() {
8 test_expect_success
"$2" '
13 [ "$(pwd -P)" = "$TOPLEVEL" ]
18 TOPLEVEL
="$(pwd -P)/repo"
23 test_cd_to_toplevel repo
'at physical root'
25 test_cd_to_toplevel repo
/sub
/dir
'at physical subdir'
28 test_cd_to_toplevel symrepo
'at symbolic root'
30 ln -s repo
/sub
/dir subdir-link
31 test_cd_to_toplevel subdir-link
'at symbolic subdir'
34 ln -s sub
/dir internal-link
35 test_cd_to_toplevel internal-link
'at internal symbolic subdir'