summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tests/protocol-compat36
1 files changed, 34 insertions, 2 deletions
diff --git a/tests/tests/protocol-compat b/tests/tests/protocol-compat
index eb017d2..b1b9025 100755
--- a/tests/tests/protocol-compat
+++ b/tests/tests/protocol-compat
@@ -11,23 +11,55 @@ prep () {
}
check () {
+ rm -rf $p.cloned
+ t-refs-same-start
+
t-archive-none $p
t-archive-query $suite
- t-dgit clone $p stable $p.cloned
+ t-dgit clone $p $suite $p.cloned
cd $p.cloned
t-ref-head
+ $1
+
t-dgit import-dsc $dscf +imported
t-ref-same refs/heads/imported
cd ..
}
+reset () {
+ cd ..
+ rm -rf $p.cloned
+ mkdir $p.cloned
+ cd $p.cloned
+ git init
+}
+
+: ---------- newer ----------
+
+suite=sid
+v=2.1
+prep
+
+perl -i~ -pe 's/^Dgit: .*/$& EXTRA DATA\n TO BE IGNORED/' $dscf
+
+check reset
+
+: ---------- newline ----------
+
+suite=testing
+v=2.0
+prep
+
+perl -i~ -pe 's/^(Dgit: \w+ \S+ \S+) (.*)/$1\n $2 EXTRA/' $dscf
+
+check
+
: ---------- older ----------
suite=stable
v=1.2
-
prep
perl -i -pe 's/^(Dgit: \w+).*/$1/' $dscf