From a2a9e1fb91709a1336c125f93c42a9d6635a4144 Mon Sep 17 00:00:00 2001 From: dein0s Date: Wed, 22 Mar 2017 13:22:10 +0300 Subject: Add force option to clean plugin --- test/tests/clean-outside-force.bash | 18 ++++++++++++++++++ test/tests/defaults.bash | 27 ++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 test/tests/clean-outside-force.bash (limited to 'test') diff --git a/test/tests/clean-outside-force.bash b/test/tests/clean-outside-force.bash new file mode 100644 index 0000000..16a740d --- /dev/null +++ b/test/tests/clean-outside-force.bash @@ -0,0 +1,18 @@ +test_description='clean forced to remove files linking outside dotfiles directory' +. '../test-lib.bash' + +test_expect_success 'setup' ' +ln -s /nowhere ~/.g +' + +test_expect_success 'run' ' +run_dotbot < ${DOTFILES}/f && echo "grape" > ~/f && -ln -s ~/f ~/.f +ln -s ~/f ~/.f && +ln -s /nowhere ~/.g ' test_expect_failure 'run-fail' ' @@ -32,3 +33,27 @@ EOF test_expect_success 'test' ' grep "apple" ~/.f ' + +test_expect_success 'run-fail' ' +run_dotbot <