summaryrefslogtreecommitdiffstats
path: root/tests/t-unpack-divert-nowarn/pkg-divert-unpacking/DEBIAN/preinst
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtests/t-unpack-divert-nowarn/pkg-divert-unpacking/DEBIAN/preinst10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/t-unpack-divert-nowarn/pkg-divert-unpacking/DEBIAN/preinst b/tests/t-unpack-divert-nowarn/pkg-divert-unpacking/DEBIAN/preinst
new file mode 100755
index 0000000..a61ad11
--- /dev/null
+++ b/tests/t-unpack-divert-nowarn/pkg-divert-unpacking/DEBIAN/preinst
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
+ dpkg-divert --quiet --package pkg-divert-unpacking --rename \
+ --divert /test-file.diverted --add /test-file 2>&1 | \
+ grep "warning: " && echo "Fail: warning in output" && exit 1 ||
+ echo Pass
+fi