From 40bb6efaa7865e6cebdf8aa00e6bd2a44b928a31 Mon Sep 17 00:00:00 2001 From: Ben Turrubiates Date: Sun, 14 Dec 2014 23:33:24 -0600 Subject: 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. --- test/rcdn-hooks.t | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/rcdn-hooks.t (limited to 'test/rcdn-hooks.t') 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 -- cgit v1.2.3