summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnish Athalye <me@anishathalye.com>2016-11-23 14:13:00 -0500
committerAnish Athalye <me@anishathalye.com>2016-11-23 14:13:00 -0500
commit847cb101d486319da882f958b1cb58b515cc6db2 (patch)
treec42dd92dab7dc01c74c97f80a42ad2c8e128378d /test
parent4468fff67a9e9d9f611d5dade4a9486e75dafa1c (diff)
parentd2e20c77db3811d8d0ef640a743f8dcc85075fdc (diff)
Merge branch 'casey/empty-source'
Diffstat (limited to 'test')
-rw-r--r--test/tests/link-default-source.bash26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/tests/link-default-source.bash b/test/tests/link-default-source.bash
new file mode 100644
index 0000000..60527d9
--- /dev/null
+++ b/test/tests/link-default-source.bash
@@ -0,0 +1,26 @@
+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
+'