From 5b9de0a5f1223706c6734636fdf9fb8392db510a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 8 Jan 2017 23:32:00 +0000 Subject: [PATCH] test suite: protocol-compat: Soup it up a lot Signed-off-by: Ian Jackson --- tests/tests/protocol-compat | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/tests/tests/protocol-compat b/tests/tests/protocol-compat index eb017d2e..b1b90254 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 -- 2.30.2