summaryrefslogtreecommitdiff
path: root/test/tests/link-no-canonicalize.bash
blob: f9ccb99edb57b5e38eb08e9910510d4fa6598cbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
test_description='linking path canonicalization can be disabled'
. '../test-lib.bash'

test_expect_success 'setup' '
echo "apple" > ${DOTFILES}/f &&
ln -s dotfiles dotfiles-symlink
'

test_expect_success 'run' '
cat > "${DOTFILES}/${INSTALL_CONF}" <<EOF
- defaults:
    link:
      canonicalize-path: false
- link:
    ~/.f:
      path: f
EOF
${DOTBOT_EXEC} -c ./dotfiles-symlink/${INSTALL_CONF}
'

test_expect_success 'test' '
[ "$(readlink ~/.f | cut -d/ -f4-)" = "dotfiles-symlink/f" ]
'