chiark / gitweb /
test suite: Test symlink modification and deletion, not creation
[dgit.git] / tests / tests / unrepresentable
index 88a697230e01ae088c91e98be2955fa18b489504..fa71bd38b6e4ca7492ea2eb8eb4832d1c4c2109b 100755 (executable)
@@ -4,13 +4,13 @@ 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; }
 
 badly-1 () {
@@ -21,19 +21,24 @@ 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 'not a plain file'
+       ln -sf NEWTARGET orig-symlink
+       git add orig-symlink
 badly-2
 
-badly-1 src.c deleted
-       git rm src.c
+badly-1 orig-symlink 'not a plain file'
+       git rm -f orig-symlink
 badly-2
 
+start
+       git rm src.c
+       git commit -m deleted
+attempt
+
 badly-1 src.c 'mode changed'
        chmod +x src.c
        git add src.c
@@ -48,4 +53,4 @@ badly-2
 start
 attempt
 
-echo ok.
+t-ok