*~
+tests/tmp
debian/dgit
debian/files
debian/*.substvars
Testing facilities:
* Provide "test-dummy" distro with "dummycat" access method.
* Provide fake "ssh" program in tests/ which does nothing much.
+ * Provide tests/lib, and one pari-extra based clone test.
--
A copy of the GNU General Public License v3 can be found in
/usr/share/common-licenses/GPL-3.
+
+
+The tests/ directory contains a complete copy of the source code for
+the pari-extra 3-1 package. This is a dummy package containing only
+Debian metadata, by Bill Alombert, with a licence statement saying
+it's GPL (implicitly GPLv3 compatible).
--- /dev/null
+#
+
+exec 2>&1
+
+root=`pwd`
+troot=$root/tests
+testname="${0##*/}"
+
+tmp=$ADTTMP
+if [ x"$tmp" = x ]; then
+ mkdir -p tests/tmp
+ tmp=tests/tmp/$testname
+ rm -rf $tmp
+ mkdir $tmp
+fi
+cd $tmp
+tmp=`pwd`
+export DGIT_TEST_DUMMY_DIR=$tmp
+ln $troot/ssh ssh
+
+t-git () {
+ mkdir -p git
+ cp -al $troot/git-srcs/$1 git/.
+}
+
+t-archive () {
+ p=$1
+ mkdir -p aq mirror
+ local dscf=${p}_$2.dsc
+ ln $troot/pkg-srcs/${p}_${2%-*}* mirror/
+ echo sid >aq/suite.unstable
+ echo "$2 $dscf" >>aq/package.sid.${p}
+ mkdir extract
+ (set -e; cd extract; dpkg-source -x ../mirror/$dscf)
+}
+
+t-dgit () {
+ ${DGIT_TEST-dgit} --dget:-u -dtest-dummy "$@"
+}
+
+t-diff-nogit () {
+ diff --exclude=.git -ruN $*
+}
+
+t-output () {
+ printf "%s\n" "$1" >$tmp/t.want
+ shift
+ "$@" >$tmp/t.got
+ diff $tmp/t.want $tmp/t.got
+}
+
+t-clean-on-branch () {
+ t-output "## $1" git status -b --porcelain
+}
+
+t-refs-same () {
+ local f=$1
+ git rev-parse $f >$tmp/t.ref1
+ local g
+ for g in $*; do
+ git rev-parse $g >$tmp/t.refn
+ diff $tmp/t.ref1 $tmp/t.refn
+ done
+}
--- /dev/null
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+Format: 1.0
+Source: pari-extra
+Binary: pari-extra
+Architecture: all
+Version: 3-1
+Maintainer: Bill Allombert <ballombe@debian.org>
+Standards-Version: 3.9.2.0
+Build-Depends: debhelper (>= 5)
+Package-List:
+ pari-extra deb math optional
+Checksums-Sha1:
+ ff281e103ab11681324b0c694dd3514d78436c51 121 pari-extra_3.orig.tar.gz
+ 080078dbc51e4194d209cb5abe57e2b25705fcaa 2358 pari-extra_3-1.diff.gz
+Checksums-Sha256:
+ ac1ef39f9da80b582d1c0b2adfb09b041e3860ed20ddcf57a0e922e3305239df 121 pari-extra_3.orig.tar.gz
+ bf4672acd5302b9eebee2f3bf5269022279e531204d7172b8761bb10fae3517a 2358 pari-extra_3-1.diff.gz
+Files:
+ 76bcf03be979d3331f9051aa88439b8b 121 pari-extra_3.orig.tar.gz
+ 02a39965adb84da9b3e6b5c5a0a4c378 2358 pari-extra_3-1.diff.gz
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+
+iEYEARECAAYFAk5CvdoACgkQeDPs8bVESBX0mACeK3Yf9y22T2b6tw8eVQ8XSYxH
+ix4AoJJ3jrGJ4HXJNv/wbvmvBkkybvYJ
+=hkic
+-----END PGP SIGNATURE-----
--- /dev/null
+#!/bin/bash
+set -e
+. tests/lib
+
+t-git none
+t-archive pari-extra 3-1
+
+t-dgit clone $p
+
+t-diff-nogit extract/$p-3 $p
+cd $p
+t-clean-on-branch dgit/sid
+t-refs-same HEAD remotes/dgit/dgit/sid
+
+echo ok