chiark / gitweb /
test suite: gdr-new-upstream: Test updating existing clog entry
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 25 Aug 2018 16:40:04 +0000 (17:40 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 26 Aug 2018 00:20:44 +0000 (01:20 +0100)
This is the test case for #905888.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/tests/gdr-newupstream

index 300d434..3039669 100755 (executable)
@@ -85,4 +85,25 @@ t-gdr-good stitched
 
 git diff --quiet ordinary
 
+: ----- with pre-existing changes -----
+
+git checkout -b with-preexisting before-new-upstream
+
+t-dch-commit drivel-in-changelog
+git branch before-new-upstream-with-changes
+
+t-git-next-date
+
+t-git-debrebase new-upstream ${v%-*}
+
+clog-check-1 before-new-upstream-with-changes
+perl -pe <../clog.before >../clog.expected '
+       BEGIN { ($m,$e,@ARGV) = @ARGV; }
+       next unless 1..m/^ --/;
+       s/\([^()]+\)/('$v')/ if m/^example /;
+       $_ .= "$m\n" if m/^  \* drivel-in-changelog/;
+       $_ = " -- $e\n" if m/^ -- /;
+' "$m" "$e"
+clog-check-2
+
 t-ok