summaryrefslogtreecommitdiffstats
path: root/tests/debian/01/run
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtests/debian/01/run33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/debian/01/run b/tests/debian/01/run
new file mode 100755
index 0000000..6db7cf0
--- /dev/null
+++ b/tests/debian/01/run
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+# The goal of this test is to check the distributed files (as debdiff)
+
+save()
+{
+ [ ! -d tmp ] && mkdir tmp
+}
+
+restore()
+{
+ rm tmp/login_files tmp/passwd_files
+ rmdir tmp
+}
+
+save
+
+trap 'restore' 0
+
+dpkg -L login | sort > tmp/login_files
+dpkg -L passwd | sort > tmp/passwd_files
+
+echo -n "Checking the login files..."
+diff -u data/login_files tmp/login_files
+echo "OK"
+echo -n "Checking the passwd files..."
+diff -u data/passwd_files tmp/passwd_files
+echo OK
+