Package: letterize
Version: 1.4-2
Severity: normal
Tags: patch
X-Debbugs-Cc: nil...@debian.org

Dear Maintainer,

letterize does not have any autopkgtests at the moment,
I've attempted adding these, please consider applying the patch

Nilesh

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.7.0-2-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages letterize depends on:
ii  libc6  2.31-3

letterize recommends no packages.

letterize suggests no packages.
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d2aa55a
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..970a07d
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+if [ "$AUTOPKGTEST_TMP" = "" ] ; then
+  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cd $AUTOPKGTEST_TMP
+
+echo "Test functionality"
+
+letterize 98 > test1
+letterize 76452 > test2
+
+# Checking the output is indeed what we asked for
+echo "ba8b09ebb2cb1dc84c9ac9e42869df68 test1" > checksums
+echo "c6e3602db0c45173bfaac6e4655ae08c test2" >> checksums
+md5sum --check checksums
+
+# Clean up
+rm -f test* checksums
+echo "PASS"

Reply via email to