summaryrefslogtreecommitdiff
path: root/test/rcup-hooks.t
blob: 8890f7bc81278732652297560e87f5e4f2a8baa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  $ . "$TESTDIR/helper.sh"

Pre-up and post-up hooks should run by default

  $ mkdir -p .dotfiles/hooks
  > touch .dotfiles/hooks/pre-up .dotfiles/hooks/post-up
  > chmod +x .dotfiles/hooks/pre-up .dotfiles/hooks/post-up

  $ echo 'echo "example" > /tmp/test' > .dotfiles/hooks/pre-up
  > echo 'cat /tmp/test; rm /tmp/test' > .dotfiles/hooks/post-up

  $ rcup
  example

Ensure that hooks run when output of lsrc is non-empty
  $ touch .dotfiles/testrc
  > rcup
  example