summaryrefslogtreecommitdiff
path: root/test/tests/shim.bash
blob: 2ed7d543befdb7028c1acd27c5cab8ff62c86412 (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
test_description='install shim works'
. '../test-lib.bash'

test_expect_success 'setup' '
cd ${DOTFILES}
git init
if ${USE_VAGRANT}; then
    git submodule add /dotbot dotbot
else
    git submodule add ${BASEDIR} dotbot
fi
cp ./dotbot/tools/git-submodule/install .
echo "pear" > ${DOTFILES}/foo
'

test_expect_success 'run' '
cat > ${DOTFILES}/install.conf.yaml <<EOF
- link:
    ~/.foo: foo
EOF
if ! ${USE_VAGRANT}; then
    sed -i "" "1 s/sh$/python/" ${DOTFILES}/dotbot/bin/dotbot
fi
${DOTFILES}/install
'

test_expect_success 'test' '
grep "pear" ~/.foo
'