--- a/mercurial/HGTests.st Tue Nov 27 18:20:56 2012 +0000
+++ b/mercurial/HGTests.st Tue Nov 27 21:00:31 2012 +0000
@@ -56,6 +56,50 @@
"Modified: / 22-11-2012 / 11:42:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!HGTests methodsFor:'tests - branches'!
+
+test_branches_01
+ "
+ Test listing branches
+ "
+
+ | repo branches |
+
+ repo := self repositoryNamed:'test_repo_02'.
+ branches := repo branches.
+
+ self assert: branches first name = 'default'.
+ self assert: branches first isActive.
+ self assert: branches first isClosed not.
+
+ self assert: branches second name = 'branch1'.
+ self assert: branches second isActive not.
+ self assert: branches second isClosed not.
+
+ self assert: branches third name = 'branch2'.
+ self assert: branches third isActive.
+ self assert: branches third isClosed.
+
+ "Created: / 27-11-2012 / 19:50:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_branches_02
+ "
+ Test getting current branch (branch of currently checked-out working copy)
+ "
+
+ | repo wc branch |
+
+ repo := self repositoryNamed:'test_repo_02'.
+ wc := repo workingCopy.
+ branch := wc branch.
+
+ self assert: branch name = 'default'.
+ self assert: wc changeset branch == branch.
+
+ "Created: / 27-11-2012 / 20:44:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!HGTests methodsFor:'tests - changesets'!
test_changeset_01
@@ -168,6 +212,21 @@
'
"Created: / 17-11-2012 / 00:19:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_changeset_06
+ "
+ Test access to changeset contents
+ "
+
+ | repo cs |
+
+ repo := self repositoryNamed:'test_repo_02'.
+ cs := repo @ 5.
+ self assert: cs parent1 id revno = 0.
+ self assert: cs parent2 id revno = 4.
+
+ "Created: / 27-11-2012 / 20:54:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!HGTests methodsFor:'tests - node id'!