~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to testbzr

  • Committer: Martin Pool
  • Date: 2005-04-28 09:55:15 UTC
  • Revision ID: mbp@sourcefrog.net-20050428095515-2df064efc412531a
testbzr: clean up crlf handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
    outd, errd = child.communicate()
76
76
    logfile.write(outd)
77
77
    actual_retcode = child.wait()
 
78
 
 
79
    outd = outd.replace('\r', '')
78
80
    
79
81
    if retcode != actual_retcode:
80
82
        raise CommandFailed("test failed: %r returned %d, expected %d"
142
144
    f.write('hello world!\n')
143
145
    f.close()
144
146
 
145
 
    out = backtick("bzr unknowns").rstrip('\r\n')
146
 
    assert out == 'test.txt'
 
147
    out = backtick("bzr unknowns")
 
148
    assert out == 'test.txt\n'
147
149
 
148
 
    out = backtick("bzr status").replace('\r', '')
 
150
    out = backtick("bzr status")
149
151
    assert out == '''?       test.txt\n'''
150
152
 
151
 
    out = backtick("bzr status --all").replace('\r', '')
 
153
    out = backtick("bzr status --all")
152
154
    assert out == "?       test.txt\n"
153
155
 
154
156
    progress("can't rename unversioned file")
158
160
 
159
161
    runcmd("bzr add test.txt")
160
162
    assert backtick("bzr unknowns") == ''
161
 
    assert backtick("bzr status --all").replace('\r', '') == "A       test.txt\n"
 
163
    assert backtick("bzr status --all") == "A       test.txt\n"
162
164
 
163
165
    progress("rename newly-added file")
164
166
    runcmd("bzr rename test.txt hello.txt")
165
167
    assert os.path.exists("hello.txt")
166
168
    assert not os.path.exists("test.txt")
167
169
 
 
170
    assert backtick("bzr revno") == '0'
 
171
 
168
172
    cd('..')
169
173
 
170
174
    progress("all tests passed!")