diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/assert-install.sh | 14 | ||||
-rwxr-xr-x | tests/assert-uninstall.sh | 24 |
2 files changed, 24 insertions, 14 deletions
diff --git a/tests/assert-install.sh b/tests/assert-install.sh index f8c0104..65080df 100755 --- a/tests/assert-install.sh +++ b/tests/assert-install.sh @@ -21,18 +21,4 @@ NODE_PATH="$D/usr/lib/node:$NODE_PATH" "$(yellow "$0")" papo -V | grep -q '^papo ' printf ' %s\n' "$(green 'OK')" - - make -s DESTDIR="$D" uninstall - printf '%s: that the "uninstall" target removes everything...' \ - "$(yellow "$0")" - if [ "$(find "$D" -not -type d | wc -l)" != 0 ]; then - printf ' ERR.\n' - cat <<-EOF - Leftover files not removed by "make uninstall": - - $(find "$D" -not -type d) - EOF - exit 1 - fi - printf ' %s\n' "$(green 'OK')" } >&2 diff --git a/tests/assert-uninstall.sh b/tests/assert-uninstall.sh new file mode 100755 index 0000000..82fc86f --- /dev/null +++ b/tests/assert-uninstall.sh @@ -0,0 +1,24 @@ +#!/bin/sh +set -eu + +. tools/lib.sh + +D="$(mkdtemp)" +trap 'rm -rf "$D"' EXIT + +{ + make -s DESTDIR="$D" install + make -s DESTDIR="$D" uninstall + printf '%s: that the "uninstall" target removes everything...' \ + "$(yellow "$0")" + if [ "$(find "$D" -not -type d | wc -l)" != 0 ]; then + printf ' ERR.\n' + cat <<-EOF + Leftover files not removed by "make uninstall": + + $(find "$D" -not -type d) + EOF + exit 1 + fi + printf ' %s\n' "$(green 'OK')" +} >&2 |