~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/blackbox.py

merge David Clymer's patch for TestCaseInTestDir.runcmd

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
it's normally invoked.
27
27
"""
28
28
 
 
29
from cStringIO import StringIO
29
30
import sys
30
31
import os
31
32
 
256
257
        os.chdir('../b')
257
258
        self.runbzr('pull ../a')
258
259
        assert a.revision_history()[-1] == b.revision_history()[-1]
259
 
        
260
260
 
261
261
    def test_add_reports(self):
262
262
        """add command prints the names of added files."""
263
263
        b = Branch.initialize('.')
264
264
        self.build_tree(['top.txt', 'dir/', 'dir/sub.txt'])
265
 
 
266
 
        from cStringIO import StringIO
267
265
        out = StringIO()
268
 
 
269
266
        ret = self.apply_redirected(None, out, None,
270
267
                                    run_bzr,
271
268
                                    ['add'])
272
269
        self.assertEquals(ret, 0)
273
 
 
274
270
        # the ordering is not defined at the moment
275
271
        results = sorted(out.getvalue().rstrip('\n').split('\n'))
276
272
        self.assertEquals(['added dir',