summaryrefslogtreecommitdiff
path: root/test/tests/shim.bash
diff options
context:
space:
mode:
Diffstat (limited to 'test/tests/shim.bash')
-rw-r--r--test/tests/shim.bash29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/tests/shim.bash b/test/tests/shim.bash
new file mode 100644
index 0000000..2ed7d54
--- /dev/null
+++ b/test/tests/shim.bash
@@ -0,0 +1,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
+'