460
460
self.runbzr('pull ../b')
461
461
self.runbzr('pull ../b')
464
"""Test the abilities of 'bzr ls'"""
466
def bzrout(*args, **kwargs):
467
kwargs['backtick'] = True
468
return self.runbzr(*args, **kwargs)
470
def ls_equals(value, *args):
471
out = self.runbzr(['ls'] + list(args), backtick=True)
472
self.assertEquals(out, value)
475
open('a', 'wb').write('hello\n')
478
bzr('ls --verbose --null', retcode=1)
481
ls_equals('? a\n', '--verbose')
482
ls_equals('a\n', '--unknown')
483
ls_equals('', '--ignored')
484
ls_equals('', '--versioned')
485
ls_equals('a\n', '--unknown', '--ignored', '--versioned')
486
ls_equals('', '--ignored', '--versioned')
487
ls_equals('a\0', '--null')
490
ls_equals('V a\n', '--verbose')
497
open('subdir/b', 'wb').write('b\n')
503
bzr('commit -m subdir')
511
, '--verbose', '--non-recursive')
513
# Check what happens in a sub-directory
525
, '--from-root', '--null')
528
, '--from-root', '--non-recursive')
532
# Check what happens when we supply a specific revision
533
ls_equals('a\n', '--revision', '1')
535
, '--verbose', '--revision', '1')
538
ls_equals('', '--revision', '1')
540
# Now try to do ignored files.
542
open('blah.py', 'wb').write('unknown\n')
543
open('blah.pyo', 'wb').write('ignored\n')
555
ls_equals('blah.pyo\n'
557
ls_equals('blah.py\n'
463
565
def test_locations(self):
464
566
"""Using and remembering different locations"""