mercurial/HGCommandParserTests.st
changeset 336 93b086927aea
parent 335 7e19ab19148b
child 358 a29af7da2825
--- a/mercurial/HGCommandParserTests.st	Fri Jul 12 17:47:21 2013 +0100
+++ b/mercurial/HGCommandParserTests.st	Sat Jul 13 12:21:46 2013 +0100
@@ -257,6 +257,46 @@
     "Created: / 14-02-2013 / 15:25:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+test_cmd_pull_02
+
+    | info |
+
+    info := (HGCommandParser on: 'pulling from ssh://hg@bitbucket.org/janvrany/stx-libscm
+searching for changes
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 11 changes to 111 files
+(run ''hg update'' to get a working copy)
+') parseCommandPull.
+
+    self assert: info numChangesets = 1.
+    self assert: info numChanges = 11.
+    self assert: info numFiles = 111.
+    self assert: info numHeads = 0.
+
+    "Created: / 13-07-2013 / 12:08:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_cmd_pull_05b
+
+    | info |
+
+    info := (HGCommandParser on: 'pulling from ssh://hg@bitbucket.org/janvrany/stx-libscm
+searching for changes
+no changes found
+remote: X11 forwarding request failed on channel 0
+') parseCommandPull.
+
+    self assert: info numChangesets = 0.
+    self assert: info numChanges = 0.
+    self assert: info numFiles = 0.
+    self assert: info numHeads = 0.
+
+    "Created: / 13-07-2013 / 11:47:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 test_cmd_push_01
 
     | info |
@@ -332,6 +372,47 @@
     "Created: / 02-07-2013 / 01:19:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+test_cmd_push_05a
+
+    | info |
+
+    info := (HGCommandParser on: 'pushing to https://vranyj1@swing.fit.cvut.cz/hg/stx.libbasic
+searching for changes
+remote: X11 forwarding request failed on channel 0
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 2 changesets with 18 changes to 18 files (-1 heads)
+'
+) parseCommandPush.
+
+    self assert: info numChangesets = 2.
+    self assert: info numChanges = 18.
+    self assert: info numFiles = 18.
+    self assert: info numHeads = -1.
+
+    "Created: / 13-07-2013 / 11:45:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_cmd_push_05b
+
+    | info |
+
+    info := (HGCommandParser on: 'pushing to ssh://hg@bitbucket.org/janvrany/stx-libscm
+searching for changes
+no changes found
+remote: X11 forwarding request failed on channel 0
+'
+) parseCommandPush.
+
+    self assert: info numChangesets = 0.
+    self assert: info numChanges = 0.
+    self assert: info numFiles = 0.
+    self assert: info numHeads = 0.
+
+    "Created: / 13-07-2013 / 11:46:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 test_cmd_showconfig_01
 
     | section |