summaryrefslogtreecommitdiff
path: root/tests/tests/protocol-compat
blob: eb017d2e22e0907a30c0c115274b337fa02b7c4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
set -e
. tests/lib
. $troot/lib-reprepro

t-setup-import examplegit
t-tstunt-parsechangelog

prep () {
	dscf=$tmp/mirror/pool/main/example_$v.dsc
}

check () {
	t-archive-none $p
	t-archive-query $suite

	t-dgit clone $p stable $p.cloned
	cd $p.cloned
	t-ref-head

	t-dgit import-dsc $dscf +imported
	t-ref-same refs/heads/imported
	cd ..
}

: ---------- older ----------

suite=stable
v=1.2

prep

perl -i -pe 's/^(Dgit: \w+).*/$1/' $dscf

t-git-config dgit.default.old-dsc-distro test-dummy

check

t-ok