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