diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-09 20:49:24 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-10 01:01:11 +0100 |
commit | 15229f292b8539da8b3327be89f34573812540e8 (patch) | |
tree | c17fb7a022905dbb6ecc30178bec8c009b0a3e34 /tests/tests/unrepresentable | |
parent | eb2c03527e7dd4ecb52d2b5e5b120ae58560a44f (diff) |
Test suite: unrepresentable: New test
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests/unrepresentable')
-rwxr-xr-x | tests/tests/unrepresentable | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/tests/unrepresentable b/tests/tests/unrepresentable new file mode 100755 index 0000000..88a6972 --- /dev/null +++ b/tests/tests/unrepresentable @@ -0,0 +1,51 @@ +#!/bin/bash +set -e +. tests/lib + +t-tstunt-parsechangelog + +t-prep-newpackage example 1.0 + +ln -s $troot/pkg-srcs/${p}_${v%-*}.orig.tar.* . + +cd $p + +start () { git checkout quilt-tip~0; } +attempt () { t-dgit -wgf --quilt=smash quilt-fixup; } + +badly-1 () { + wrongfn=$1 + wrongmsg=$2 + start +} + +badly-2 () { + git commit -m "Commit wrongness $wrongfn ($wrongmsg)" + t-expect-fail "cannot represent change: $wrongmsg: $wrongfn" \ + attempt +} + +badly-1 symlink 'not a plain file' + ln -s TARGET symlink + git add symlink +badly-2 + +badly-1 src.c deleted + git rm src.c +badly-2 + +badly-1 src.c 'mode changed' + chmod +x src.c + git add src.c +badly-2 + +badly-1 new 'non-default mode' + echo hi >new + chmod 755 new + git add new +badly-2 + +start +attempt + +echo ok. |