summaryrefslogtreecommitdiff
path: root/test/rcup-hooks.t
blob: 15c6790c2b58515a36417d76dcdfab0f08f24b64 (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

  $ /usr/bin/env -i PATH="$PATH" HOME="$HOME" RCRC="$RCRC" RCM_LIB="$RCM_LIB" rcup
  example

Ensure that hooks run when output of lsrc is non-empty
  $ touch .dotfiles/testrc
  $ /usr/bin/env -i PATH="$PATH" HOME="$HOME" RCRC="$RCRC" RCM_LIB="$RCM_LIB" rcup
  example