2020-01-03 16:07:44 -05:00
|
|
|
test_description='linking path canonicalization can be disabled'
|
|
|
|
. '../test-lib.bash'
|
|
|
|
|
|
|
|
test_expect_success 'setup' '
|
|
|
|
echo "apple" > ${DOTFILES}/f &&
|
2021-02-25 08:26:19 -05:00
|
|
|
echo "grape" > ${DOTFILES}/g &&
|
2020-01-03 16:07:44 -05:00
|
|
|
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' '
|
2020-12-18 14:34:28 -05:00
|
|
|
[ "$(readlink ~/.f | cut -d/ -f5-)" = "dotfiles-symlink/f" ]
|
2020-01-03 16:07:44 -05:00
|
|
|
'
|
2021-02-25 08:26:19 -05:00
|
|
|
|
|
|
|
test_expect_success 'run 2' '
|
|
|
|
cat > "${DOTFILES}/${INSTALL_CONF}" <<EOF
|
|
|
|
- defaults:
|
|
|
|
link:
|
|
|
|
canonicalize: false
|
|
|
|
- link:
|
|
|
|
~/.g:
|
|
|
|
path: g
|
|
|
|
EOF
|
|
|
|
${DOTBOT_EXEC} -c ./dotfiles-symlink/${INSTALL_CONF}
|
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'test' '
|
|
|
|
[ "$(readlink ~/.g | cut -d/ -f5-)" = "dotfiles-symlink/g" ]
|
|
|
|
'
|