Add test for closed branches

This commit is contained in:
Frej Drejhammar
2026-04-02 20:48:36 +02:00
parent c77ae926f0
commit 3285df7874
2 changed files with 29 additions and 0 deletions

View File

@@ -298,3 +298,25 @@ Added file in branch åäö
from :41
M 100644 :42 a0d01fcbff5d86327d542687dcfd8b299d054147
blob
mark :44
data 24
this-is-a-closed-branch
commit refs/heads/this-is-a-closed-branch
mark :45
author Grevious Bodily Harmsworth <gbh@example.com> 1679083200 +0000
committer Grevious Bodily Harmsworth <gbh@example.com> 1679083200 +0000
data 45
Added file in branch this-is-a-closed-branch
from :43
M 100644 :44 9d7dfd0ecce946dca320dd7826e5b9f97a0e9e79
commit refs/heads/this-is-a-closed-branch
mark :46
author Grevious Bodily Harmsworth <gbh@example.com> 1679086800 +0000
committer Grevious Bodily Harmsworth <gbh@example.com> 1679086800 +0000
data 39
Closing branch this-is-a-closed-branch
from :45

View File

@@ -108,6 +108,8 @@ commit_rest() {
make-branch "_1" 17 &&
make-branch "Feature- 12V Vac \"Venom\"" 18 &&
make-branch "åäö" 19 &&
make-branch "this-is-a-closed-branch" 20 &&
close-branch "this-is-a-closed-branch" 21 &&
hg bookmark bm-for-the-rest
)
@@ -121,6 +123,11 @@ make-branch() {
hg commit -d "2023-03-17 $2:00Z" -m "Added file in branch $1"
}
close-branch() {
hg branch "$1"
hg commit --close-branch -d "2023-03-17 $2:00Z" -m "Closing branch $1"
}
setup
test_expect_success 'all in one' '