--- a/tests/test-update-branches.t Wed Feb 24 06:10:46 2016 +0900
+++ b/tests/test-update-branches.t Wed Feb 24 23:00:33 2016 +0900
@@ -175,6 +175,41 @@
parent=1
M foo
+ $ cd ..
+
+Test updating with closed head
+---------------------------------------------------------------------
+
+ $ hg clone -U -q b1 closed-heads
+ $ cd closed-heads
+
+Test updating if at least one non-closed branch head exists
+
+if on the closed branch head:
+- updating is no-op
+- "N other heads for ...." message is displayed
+
+ $ hg update -q -C 3
+ $ hg commit --close-branch -m 6
+ $ norevtest "on closed branch head" clean 6
+ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ 1 other heads for branch "default"
+ parent=6
+
+Test updating if all branch heads are closed
+
+if on the closed branch head:
+- updating is no-op
+- "N other heads for ...." message isn't displayed
+
+ $ hg update -q -C 2
+ $ hg commit --close-branch -m 7
+ $ norevtest "all heads of branch default are closed" clean 6
+ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ parent=6
+
+ $ cd ../b1
+
Test obsolescence behavior
---------------------------------------------------------------------