summaryrefslogtreecommitdiff
path: root/test/tests/defaults.bash
blob: 595f950841d9bb0e3442ecd2f1b313622bfdc3c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
test_description='defaults setting works'
. '../test-lib.bash'

test_expect_success 'setup' '
echo "apple" > ${DOTFILES}/f &&
echo "grape" > ~/f &&
ln -s ~/f ~/.f
'

test_expect_failure 'run-fail' '
run_dotbot <<EOF
- link:
    ~/.f: f
EOF
'

test_expect_failure 'test-fail' '
grep "apple" ~/.f
'

test_expect_success 'run' '
run_dotbot <<EOF
- defaults:
    link:
      relink: true

- link:
    ~/.f: f
EOF
'

test_expect_success 'test' '
grep "apple" ~/.f
'