summaryrefslogtreecommitdiff
path: root/test/tests/except.bash
blob: 356eaeff1911547bffd281107ce4f6a103adccd6 (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
test_description='--except'
. '../test-lib.bash'

test_expect_success 'setup' '
echo "apple" > ${DOTFILES}/x
'

test_expect_success 'run' '
run_dotbot --except link <<EOF
- shell:
  - echo "pear" > ~/y
- link:
    ~/x: x
EOF
'

test_expect_success 'test' '
grep "pear" ~/y && ! test -f ~/x
'

test_expect_success 'run 2' '
run_dotbot --except shell <<EOF
- shell:
  - echo "pear" > ~/z
- link:
    ~/x: x
'

test_expect_success 'test' '
grep "apple" ~/x && ! test -f ~/z
'