@matheusbsbs / matheus-bagliano / commits / 64e61f2d17
Fork 0

t0050: Check whether git init detected symbolic link support correctly

Signed-off-by: Johannes Sixt <j6t@kdbg.org>

Johannes Sixt committed Mar 4, 2009 at 19:40 UTC 64e61f2d173b0172d9dbaa9667486764224568fb
1 file changed +26 -2
t/t0050-filesystem.sh
+26 -2
@@ -9,7 +9,8 @@ aumlcdiar=`printf '\x61\xcc\x88'`
9
10 case_insensitive=
11 unibad=
12 -test_expect_success 'see if we expect ' '
12 +no_symlinks=
13 +test_expect_success 'see what we expect' '
14
15 test_case=test_expect_success
16 test_unicode=test_expect_success
@@ -31,13 +32,21 @@ test_expect_success 'see if we expect ' '
32 ;;
33 *) ;;
34 esac &&
34 - rm -fr junk
35 + rm -fr junk &&
36 + {
37 + ln -s x y 2> /dev/null &&
38 + test -h y 2> /dev/null ||
39 + no_symlinks=1
40 + rm -f y
41 + }
42 '
43
44 test "$case_insensitive" &&
45 say "will test on a case insensitive filesystem"
46 test "$unibad" &&
47 say "will test on a unicode corrupting filesystem"
48 +test "$no_symlinks" &&
49 + say "will test on a filesystem lacking symbolic links"
50
51 if test "$case_insensitive"
52 then
@@ -53,6 +62,21 @@ test_expect_success "detection of case insensitive filesystem during repo init"
62 '
63 fi
64
65 +if test "$no_symlinks"
66 +then
67 +test_expect_success "detection of filesystem w/o symlink support during repo init" '
68 +
69 + v=$(git config --bool core.symlinks) &&
70 + test "$v" = false
71 +'
72 +else
73 +test_expect_success "detection of filesystem w/o symlink support during repo init" '
74 +
75 + test_must_fail git config --bool core.symlinks ||
76 + test "$(git config --bool core.symlinks)" = true
77 +'
78 +fi
79 +
80 test_expect_success "setup case tests" '
81
82 git config core.ignorecase true &&