| 1 |
$ . "$TESTDIR/helper.sh" |
| 2 |
|
| 3 |
Pre-up and post-up hooks should run by default |
| 4 |
|
| 5 |
$ mkdir -p .dotfiles/hooks |
| 6 |
> touch .dotfiles/hooks/pre-up .dotfiles/hooks/post-up |
| 7 |
> chmod +x .dotfiles/hooks/pre-up .dotfiles/hooks/post-up |
| 8 |
|
| 9 |
$ echo 'echo "example" > /tmp/test' > .dotfiles/hooks/pre-up |
| 10 |
> echo 'cat /tmp/test; rm /tmp/test' > .dotfiles/hooks/post-up |
| 11 |
|
| 12 |
$ /usr/bin/env -i PATH="$PATH" HOME="$HOME" RCRC="$RCRC" RCM_LIB="$RCM_LIB" rcup |
| 13 |
example |
| 14 |
|
| 15 |
Ensure that hooks run when output of lsrc is non-empty |
| 16 |
$ touch .dotfiles/testrc |
| 17 |
$ /usr/bin/env -i PATH="$PATH" HOME="$HOME" RCRC="$RCRC" RCM_LIB="$RCM_LIB" rcup |
| 18 |
example |