[Pkg-bazaar-commits] ./bzr/unstable r307: testbzr: clean up crlf handling
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 07:43:50 UTC 2009
------------------------------------------------------------
revno: 307
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Thu 2005-04-28 19:55:15 +1000
message:
testbzr: clean up crlf handling
modified:
testbzr
-------------- next part --------------
=== modified file 'testbzr'
--- a/testbzr 2005-04-28 09:48:35 +0000
+++ b/testbzr 2005-04-28 09:55:15 +0000
@@ -75,6 +75,8 @@
outd, errd = child.communicate()
logfile.write(outd)
actual_retcode = child.wait()
+
+ outd = outd.replace('\r', '')
if retcode != actual_retcode:
raise CommandFailed("test failed: %r returned %d, expected %d"
@@ -142,13 +144,13 @@
f.write('hello world!\n')
f.close()
- out = backtick("bzr unknowns").rstrip('\r\n')
- assert out == 'test.txt'
+ out = backtick("bzr unknowns")
+ assert out == 'test.txt\n'
- out = backtick("bzr status").replace('\r', '')
+ out = backtick("bzr status")
assert out == '''? test.txt\n'''
- out = backtick("bzr status --all").replace('\r', '')
+ out = backtick("bzr status --all")
assert out == "? test.txt\n"
progress("can't rename unversioned file")
@@ -158,13 +160,15 @@
runcmd("bzr add test.txt")
assert backtick("bzr unknowns") == ''
- assert backtick("bzr status --all").replace('\r', '') == "A test.txt\n"
+ assert backtick("bzr status --all") == "A test.txt\n"
progress("rename newly-added file")
runcmd("bzr rename test.txt hello.txt")
assert os.path.exists("hello.txt")
assert not os.path.exists("test.txt")
+ assert backtick("bzr revno") == '0'
+
cd('..')
progress("all tests passed!")
More information about the Pkg-bazaar-commits
mailing list