1
0
Fork 0
mirror of synced 2024-11-12 11:48:58 -05:00
dotbot/test/tests/link-default-source.bash
Casey Rodarmor d2e20c77db Allow empty link sources
If the source for a link is null, use the basename of the destination
with a single leading '.' removed, if present.
2016-11-23 14:11:45 -05:00

26 lines
430 B
Bash

test_description='link uses destination if source is null'
. '../test-lib.bash'
test_expect_success 'setup' '
echo "apple" > ${DOTFILES}/f &&
echo "grape" > ${DOTFILES}/fd
'
test_expect_success 'run' '
run_dotbot <<EOF
- link:
~/f:
~/.f:
~/fd:
force: false
~/.fd:
force: false
EOF
'
test_expect_success 'test' '
grep "apple" ~/f &&
grep "apple" ~/.f &&
grep "grape" ~/fd &&
grep "grape" ~/.fd
'