]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t0060: move tests of real_path() from t0000 to here
authorMichael Haggerty <mhagger@alum.mit.edu>
Thu, 6 Sep 2012 22:40:57 +0000 (00:40 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 Sep 2012 23:19:57 +0000 (16:19 -0700)
Suggested by: Johannes Sixt <j6t@kdbg.org>

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0000-basic.sh
t/t0060-path-utils.sh

index ccb5435b2a7dd4724f3bc8e0b0186f248dbad448..ae6a3f077742c0504b8ed8f56b98289c704ce8f9 100755 (executable)
@@ -450,24 +450,6 @@ test_expect_success 'update-index D/F conflict' '
        test $numpath0 = 1
 '
 
-test_expect_success SYMLINKS 'real path works as expected' '
-       mkdir first &&
-       ln -s ../.git first/.git &&
-       mkdir second &&
-       ln -s ../first second/other &&
-       mkdir third &&
-       dir="$(cd .git; pwd -P)" &&
-       dir2=third/../second/other/.git &&
-       test "$dir" = "$(test-path-utils real_path $dir2)" &&
-       file="$dir"/index &&
-       test "$file" = "$(test-path-utils real_path $dir2/index)" &&
-       basename=blub &&
-       test "$dir/$basename" = "$(cd .git && test-path-utils real_path "$basename")" &&
-       ln -s ../first/file .git/syml &&
-       sym="$(cd first; pwd -P)"/file &&
-       test "$sym" = "$(test-path-utils real_path "$dir2/syml")"
-'
-
 test_expect_success 'very long name in the index handled sanely' '
 
        a=a && # 1
index 53cf1f8dc4acad959fdec359b738387aeb126b1e..c8db144c330452ca37fa94db41c5248c7ce4fedb 100755 (executable)
@@ -139,4 +139,23 @@ test_expect_success 'strip_path_suffix' '
        test c:/msysgit = $(test-path-utils strip_path_suffix \
                c:/msysgit/libexec//git-core libexec/git-core)
 '
+
+test_expect_success SYMLINKS 'real path works as expected' '
+       mkdir first &&
+       ln -s ../.git first/.git &&
+       mkdir second &&
+       ln -s ../first second/other &&
+       mkdir third &&
+       dir="$(cd .git; pwd -P)" &&
+       dir2=third/../second/other/.git &&
+       test "$dir" = "$(test-path-utils real_path $dir2)" &&
+       file="$dir"/index &&
+       test "$file" = "$(test-path-utils real_path $dir2/index)" &&
+       basename=blub &&
+       test "$dir/$basename" = "$(cd .git && test-path-utils real_path "$basename")" &&
+       ln -s ../first/file .git/syml &&
+       sym="$(cd first; pwd -P)"/file &&
+       test "$sym" = "$(test-path-utils real_path "$dir2/syml")"
+'
+
 test_done