# HG changeset patch # User Mads Kiilerich # Date 2011-11-20 23:39:32 # Node ID e19302598df88b5d16aed57fbbec07f547470946 # Parent 3aee6e26b28bf14e3e539270349848f63c853b03 tests: make test-commandserver.py independent of line ending and slash direction diff --git a/tests/test-commandserver.py b/tests/test-commandserver.py --- a/tests/test-commandserver.py +++ b/tests/test-commandserver.py @@ -128,7 +128,7 @@ def cwd(server): """ 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 @@ def localhgrc(server): # 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 hookoutput(server): 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): diff --git a/tests/test-commandserver.py.out b/tests/test-commandserver.py.out --- a/tests/test-commandserver.py.out +++ b/tests/test-commandserver.py.out @@ -77,8 +77,7 @@ defaults.tag=-d "0 0" 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"