diff options
author | Anish Athalye <me@anishathalye.com> | 2019-12-31 19:14:23 -0500 |
---|---|---|
committer | Anish Athalye <me@anishathalye.com> | 2019-12-31 19:14:23 -0500 |
commit | e38e021ab324ea676a285ac4667f1fba1469a6bf (patch) | |
tree | c26695cb033f5019e798d9bdebace6e95147d050 /test | |
parent | 81f0d7495518a1fe441343024f2320c95eff86b4 (diff) |
Add option to clean recursively
Diffstat (limited to 'test')
-rw-r--r-- | test/tests/clean-recursive.bash | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/tests/clean-recursive.bash b/test/tests/clean-recursive.bash new file mode 100644 index 0000000..8d8c09d --- /dev/null +++ b/test/tests/clean-recursive.bash @@ -0,0 +1,34 @@ +test_description='clean removes recursively' +. '../test-lib.bash' + +test_expect_success 'setup' ' +mkdir -p ~/a/b +ln -s /nowhere ~/c +ln -s /nowhere ~/a/d +ln -s /nowhere ~/a/b/e +' + +test_expect_success 'run' ' +run_dotbot <<EOF +- clean: + ~/: + force: true +EOF +' + +test_expect_success 'test' ' +! test -h ~/c && test -h ~/a/d && test -h ~/a/b/e +' + +test_expect_success 'run 2' ' +run_dotbot <<EOF +- clean: + ~/: + force: true + recursive: true +EOF +' + +test_expect_success 'test 2' ' +! test -h ~/a/d && ! test -h ~/a/b/e +' |