1#!/bin/sh
2#
3# Copyright (c) 2007 Johannes Sixt
4#
56
test_description='git-checkout-index on filesystem w/o symlinks test.
78
This tests that git-checkout-index creates a symbolic link as a plain
9file if core.symlinks is false.'
1011
. ./test-lib.sh
1213
test_expect_success \
14'preparation' '
15git-config core.symlinks false &&
16l=$(echo -n file | git-hash-object -t blob -w --stdin) &&
17echo "120000 $l symlink" | git-update-index --index-info'
1819
test_expect_success \
20'the checked-out symlink must be a file' '
21git-checkout-index symlink &&
22test -f symlink'
2324
test_expect_success \
25'the file must be the blob we added during the setup' '
26test "$(git-hash-object -t blob symlink)" = $l'
2728
test_done