X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Ftests%2Funrepresentable;h=e4b0da85a4e2fcb5c686697687ef210640ba063b;hb=237fe933713ea3d86ed8fbdb86819797b770405b;hp=88a697230e01ae088c91e98be2955fa18b489504;hpb=15229f292b8539da8b3327be89f34573812540e8;p=dgit.git diff --git a/tests/tests/unrepresentable b/tests/tests/unrepresentable index 88a69723..e4b0da85 100755 --- a/tests/tests/unrepresentable +++ b/tests/tests/unrepresentable @@ -4,14 +4,19 @@ set -e t-tstunt-parsechangelog -t-prep-newpackage example 1.0 +t-prep-newpackage example 1.1 ln -s $troot/pkg-srcs/${p}_${v%-*}.orig.tar.* . cd $p -start () { git checkout quilt-tip~0; } +start () { git checkout quilt-tip-1.1~0; } attempt () { t-dgit -wgf --quilt=smash quilt-fixup; } +good () { + attempt + t-dgit --quilt=nofix -wgf build-source + t-dgit -wgf --dry-run push --new +} badly-1 () { wrongfn=$1 @@ -21,31 +26,42 @@ badly-1 () { badly-2 () { git commit -m "Commit wrongness $wrongfn ($wrongmsg)" - t-expect-fail "cannot represent change: $wrongmsg: $wrongfn" \ + t-expect-fail E:"cannot represent change: $wrongmsg .*: $wrongfn" \ attempt } -badly-1 symlink 'not a plain file' - ln -s TARGET symlink - git add symlink +badly-1 orig-symlink 'modified symlink' + ln -sf NEWTARGET orig-symlink + git add orig-symlink badly-2 -badly-1 src.c deleted - git rm src.c +badly-1 orig-symlink 'deletion of symlink' + git rm -f orig-symlink badly-2 -badly-1 src.c 'mode changed' +start + git rm src.c + git commit -m deleted +good + +start + git rm orig-exec + git rm -f orig-unwriteable + git commit -m 'deleted funny' +good + +badly-1 src.c 'mode or type changed' chmod +x src.c git add src.c badly-2 -badly-1 new 'non-default mode' +badly-1 new 'creation with non-default mode' echo hi >new chmod 755 new git add new badly-2 start -attempt +good -echo ok. +t-ok