diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-07-06 17:33:29 +0100 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-07-07 09:54:19 +0100 |
commit | 985cefa0cc7c74ec57954fc5fbd46af0bcf03297 (patch) | |
tree | f5e895220a5c11b04bc70260ece1e35162d80284 | |
parent | 72db2bcecf17415ccb098ad2b9a4ef1dc452ac0f (diff) |
test suite: tagupl: test one bad tag
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-x | tests/tests/tagupl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/tests/tagupl b/tests/tests/tagupl index 7859400..c45f5e9 100755 --- a/tests/tests/tagupl +++ b/tests/tests/tagupl @@ -30,6 +30,39 @@ tagname=test-dummy/$v t-tagupl-test --no-push --quilt=gbp # xxx test pushing + # todo: test each miss/rejection +ident=ok + +git cat-file tag $tagname >../basetag +v=1.0-2 +tagname=test-dummy/$v + +perl -i -ne ' + next if $.==1../^$/; + next if m/^----/..0; + s/\b1\.0-1\b/1.0-2/g; + print or die $!; +' ../basetag + +with-mangled () { + local perl=$1 + perl <../basetag >../badtag-$ident -pe "$perl" + git tag -u Senatus -f -s -m "$(cat ../badtag-$ident)" "$tagname" + + t-tagupl-run-drs +} + +expect-quit () { + mv ../tagupl/overall.log ../tagupl/overall.log-$ident + ident=$1 + local perl=$2 + local mstring=$3 + with-mangled "$perl" + grep ": $mstring" ../tagupl/overall.log +} + +expect-quit noplease s/please-upload/plunk/ 'tag missing please-upload' + t-ok |