[Reproducible-commits] [diffoscope] 02/02: Add another autopkgtest to test command line without recommends

Jérémy Bobbio lunar at moszumanska.debian.org
Mon Nov 16 11:48:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository diffoscope.

commit 7e9a5033c54f1ea0c6a81ebff69c47f76e7283eb
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Mon Nov 16 11:39:32 2015 +0100

    Add another autopkgtest to test command line without recommends
---
 debian/tests/basic-command-line | 24 ++++++++++++++++++++++++
 debian/tests/control            |  4 ++++
 2 files changed, 28 insertions(+)

diff --git a/debian/tests/basic-command-line b/debian/tests/basic-command-line
new file mode 100755
index 0000000..6de3b2a
--- /dev/null
+++ b/debian/tests/basic-command-line
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# not set -e: we are testing exit codes
+
+if ! [ -d "$ADTTMP" ]; then
+	echo "ADTTMP not set." >&2
+	exit 1
+fi
+
+echo "a" > $ADTTMP/a
+echo "a" > $ADTTMP/a_
+echo "b" > $ADTTMP/b
+
+diffoscope $ADTTMP/a $ADTTMP/a_
+if [ $? -ne 0 ]; then
+	echo "Exit code was different from 0 when comparing files with identical content." >&2
+	exit 1
+fi
+
+diffoscope $ADTTMP/a $ADTTMP/b
+if [ $? -ne 1 ]; then
+	echo "Exit code was different from 1 when comparing files with different content." >&2
+	exit 1
+fi
diff --git a/debian/tests/control b/debian/tests/control
index 162dcbb..c664c90 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -5,3 +5,7 @@ Restrictions: needs-recommends
 Test-Command: debian/tests/pytest
 Depends: diffoscope, python3-pytest
 # but without Recommends
+
+Tests: basic-command-line
+Depends: diffoscope
+# without Recommends

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git



More information about the Reproducible-commits mailing list