diff options
author | Ben Turrubiates <ben@turrubiat.es> | 2014-12-14 23:33:24 -0600 |
---|---|---|
committer | Mike Burns <mike@mike-burns.com> | 2015-01-07 16:49:52 +0100 |
commit | 40bb6efaa7865e6cebdf8aa00e6bd2a44b928a31 (patch) | |
tree | 89d910e6624465cf89b42ce57daf23ee7f92d8ed /test/rcdn-hooks.t | |
parent | 366dd721483e6dd55e1da1ca7aa6caa3efc19261 (diff) |
Run hooks on rcdn as indicated by the manpage
- Make sure IFS in rcup and rcdn isn't left in an incorrect state when
the output of lsrc is empty.
- Add tests to check that hooks run on rcdn and rcup by default.
Diffstat (limited to 'test/rcdn-hooks.t')
-rw-r--r-- | test/rcdn-hooks.t | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/rcdn-hooks.t b/test/rcdn-hooks.t new file mode 100644 index 0000000..1edde40 --- /dev/null +++ b/test/rcdn-hooks.t @@ -0,0 +1,19 @@ + $ . "$TESTDIR/helper.sh" + +Pre-down and post-down hooks should run by default + + $ mkdir -p .dotfiles/hooks + > touch .dotfiles/hooks/pre-down .dotfiles/hooks/post-down + > chmod +x .dotfiles/hooks/pre-down .dotfiles/hooks/post-down + + $ echo 'echo "example" > /tmp/test' > .dotfiles/hooks/pre-down + > echo 'cat /tmp/test; rm /tmp/test' > .dotfiles/hooks/post-down + + $ rcdn + example + +Ensure that hooks run when output of lsrc is non-empty + $ touch .dotfiles/testrc + > rcup + > rcdn + example |