@@ -4,6 +4,7 @@ Homepage: https://www.darwinsys.com/file/
Standards-Version: 4.4.1
Vcs-Browser: https://git.in-ulm.de/cbiedl/file
Vcs-Git: https://git.in-ulm.de/cbiedl/file.git
+Testsuite: autopkgtest
Build-Depends: debhelper-compat (= 12),
libbz2-dev,
liblzma-dev,
@@ -0,0 +1,2 @@
+Tests: run-testsuite
+Depends: @
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -eu
+export TZ=UTC
+cd tests
+EXIT=0
+for i in *.testfile; do
+ printf 'Testing: %s ... ' "$i"
+ if [ -f ${i%%.testfile}.magic ]; then
+ m="-m ${i%%.testfile}.magic"
+ else
+ m=
+ fi;
+ if [ "$(file -b $m "$i")" = "$(cat ${i%%.testfile}.result)" ] ; then
+ echo 'pass'
+ echo 'FAILED'
+ EXIT=1
+ fi
+done
+exit $EXIT