diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2022-09-03 16:40:51 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2022-09-03 17:59:37 +0100 |
commit | 05d679a61360423ba90eff4e442564903568dc2f (patch) | |
tree | 81240245e8baedf848694a6e1362a402a1efab2f /tests | |
parent | 46400709f1dbcb4ca5ba9c7787c099a36e0bbeeb (diff) |
tests: Test dpkg-source debian-single-patch with strange changes
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/tests/unrepresentable | 33 | ||||
-rwxr-xr-x | tests/tests/unrepresentable-single-dpkg | 4 |
2 files changed, 28 insertions, 9 deletions
diff --git a/tests/tests/unrepresentable b/tests/tests/unrepresentable index fba0014..efd2d63 100755 --- a/tests/tests/unrepresentable +++ b/tests/tests/unrepresentable @@ -10,7 +10,19 @@ ln -s $troot/pkg-srcs/${p}_${v%-*}.orig.tar.* . cd $p +make_singlepatch () { + git checkout quilt-tip-1.1 + echo >debian/source/options single-debian-patch + git add debian/source/options + git commit -m single-debian-patch debian/source/options +} + quilt_mode=smash +case $DGIT_TEST_TESTNAME in + *-single-dpkg) make_singlepatch ;; + *-*) fail 'unknown test name' ;; + *) ;; +esac quilt-fixup () { t-dgit -wgf --quilt=$quilt_mode quilt-fixup @@ -48,7 +60,10 @@ start () { git checkout quilt-tip-1.1~0; } finish () { - expected=$1 + case "$DGIT_TEST_TESTNAME" in + *-single-dpkg) expected=${2-$1} ;; + *) expected=$1 ;; + esac case "$expected" in NOTHING) ;; @@ -91,35 +106,35 @@ finish () { start orig-symlink ln -sf NEWTARGET orig-symlink git add orig-symlink -finish EP:'modified symlink' +finish EP:'modified symlink' 'new version is symlink' start orig-symlink git rm -f orig-symlink -finish EP:'deletion of symlink' +finish EP:'deletion of symlink' LATE-EP:'Mode change from 20000 to 000000' start new ln -s hi new git add new -finish 'new version is symlink' +finish 'new version is symlink' 'new version is symlink' start src.c git rm src.c -finish GOOD:deleted +finish GOOD:deleted LATE-EP:'Mode change from 644 to 000000' start orig-exec git rm orig-exec -finish GOOD:'deleted exec' +finish GOOD:'deleted exec' LATE-EP:'Mode change from 755 to 000000' start orig-unwriteable git rm -f orig-unwriteable -finish GOOD:'deleted unwritable' +finish GOOD:'deleted unwritable' LATE-EP:'Mode change from 644 to 000000' start src.c chmod +x src.c git add src.c -finish 'EP:mode or type changed' +finish 'EP:mode or type changed' LATE-EP:'Mode change from 644 to 755' start nothing -finish NOTHING +finish NOTHING NOTHING t-ok diff --git a/tests/tests/unrepresentable-single-dpkg b/tests/tests/unrepresentable-single-dpkg new file mode 100755 index 0000000..f1ac270 --- /dev/null +++ b/tests/tests/unrepresentable-single-dpkg @@ -0,0 +1,4 @@ +#!/bin/bash +set -e +. tests/lib +t-chain-test unrepresentable |