summaryrefslogtreecommitdiff
path: root/test/rcdn-hooks.t
blob: 1edde40c5df8bbe3cbc0b5bdea25b03903ccd2e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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