--- a/tests/test-commandserver.t Fri Nov 14 16:38:58 2014 -0800
+++ b/tests/test-commandserver.t Sat Nov 15 12:43:35 2014 +0900
@@ -524,6 +524,27 @@
prompt: 5678
+run commandserver in commandserver, which is silly but should work:
+
+ >>> import cStringIO
+ >>> from hgclient import readchannel, runcommand, check
+ >>> @check
+ ... def nested(server):
+ ... print '%c, %r' % readchannel(server)
+ ... class nestedserver(object):
+ ... stdin = cStringIO.StringIO('getencoding\n')
+ ... stdout = cStringIO.StringIO()
+ ... runcommand(server, ['serve', '--cmdserver', 'pipe'],
+ ... output=nestedserver.stdout, input=nestedserver.stdin)
+ ... nestedserver.stdout.seek(0)
+ ... print '%c, %r' % readchannel(nestedserver) # hello
+ ... print '%c, %r' % readchannel(nestedserver) # getencoding
+ o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob)
+ *** runcommand serve --cmdserver pipe
+ o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob)
+ r, '*' (glob)
+
+
start without repository:
$ cd ..