Mercurial > hg
changeset 15542:e19302598df8
tests: make test-commandserver.py independent of line ending and slash direction
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 21 Nov 2011 00:39:32 +0100 |
parents | 3aee6e26b28b |
children | 49a5db5b10de |
files | tests/test-commandserver.py tests/test-commandserver.py.out |
diffstat | 2 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-commandserver.py Mon Nov 21 00:39:32 2011 +0100 +++ b/tests/test-commandserver.py Mon Nov 21 00:39:32 2011 +0100 @@ -128,7 +128,7 @@ """ check that --cwd doesn't persist between requests """ readchannel(server) os.mkdir('foo') - f = open('foo/bar', 'w') + f = open('foo/bar', 'wb') f.write('a') f.close() runcommand(server, ['--cwd', 'foo', 'st', 'bar']) @@ -145,7 +145,7 @@ # but not for this repo runcommand(server, ['init', 'foo']) - runcommand(server, ['-R', 'foo', 'showconfig']) + runcommand(server, ['-R', 'foo', 'showconfig', 'ui', 'defaults']) shutil.rmtree('foo') def hook(**args): @@ -160,7 +160,10 @@ def outsidechanges(server): readchannel(server) - os.system('echo a >> a && hg ci -Am2') + f = open('a', 'ab') + f.write('a\n') + f.close() + os.system('hg ci -Am2') runcommand(server, ['tip']) def bookmarks(server):
--- a/tests/test-commandserver.py.out Mon Nov 21 00:39:32 2011 +0100 +++ b/tests/test-commandserver.py.out Mon Nov 21 00:39:32 2011 +0100 @@ -77,8 +77,7 @@ ui.slash=True ui.foo=bar runcommand init foo - runcommand -R foo showconfig -bundle.mainreporoot=$TESTTMP/foo + runcommand -R foo showconfig ui defaults defaults.backout=-d "0 0" defaults.commit=-d "0 0" defaults.tag=-d "0 0"