~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_shelve.py

  • Committer: Aaron Bentley
  • Date: 2008-12-03 05:31:27 UTC
  • mto: This revision was merged to the branch mainline in revision 3893.
  • Revision ID: aaron@aaronbentley.com-20081203053127-vozu5rmsixaadw0v
Change ls-shelf to shelve --list

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from bzrlib import shelf
18
18
from bzrlib.tests import TestCaseWithTransport
19
19
 
20
 
class TestLSShelf(TestCaseWithTransport):
 
20
class TestShelveList(TestCaseWithTransport):
21
21
 
22
22
    def test_no_shelved_changes(self):
23
23
        tree = self.make_branch_and_tree('.')
24
 
        err = self.run_bzr('ls-shelf')[1]
 
24
        err = self.run_bzr('shelve --list')[1]
25
25
        self.assertEqual('No shelved changes.\n', err)
26
26
 
27
27
    def test_shelve_one(self):
28
28
        tree = self.make_branch_and_tree('.')
29
29
        creator = shelf.ShelfCreator(tree, tree.basis_tree(), [])
30
30
        shelf_id = tree.get_shelf_manager().shelve_changes(creator, 'Foo')
31
 
        out, err = self.run_bzr('ls-shelf', retcode=1)
 
31
        out, err = self.run_bzr('shelve --list', retcode=1)
32
32
        self.assertEqual('', err)
33
33
        self.assertEqual('  1: Foo\n', out)
34
34
 
36
36
        tree = self.make_branch_and_tree('.')
37
37
        creator = shelf.ShelfCreator(tree, tree.basis_tree(), [])
38
38
        shelf_id = tree.get_shelf_manager().shelve_changes(creator)
39
 
        out, err = self.run_bzr('ls-shelf', retcode=1)
 
39
        out, err = self.run_bzr('shelve --list', retcode=1)
40
40
        self.assertEqual('', err)
41
41
        self.assertEqual('  1: <no message>\n', out)
42
42
 
46
46
        tree.get_shelf_manager().shelve_changes(creator, 'Foo')
47
47
        creator = shelf.ShelfCreator(tree, tree.basis_tree(), [])
48
48
        tree.get_shelf_manager().shelve_changes(creator, 'Bar')
49
 
        out, err = self.run_bzr('ls-shelf', retcode=1)
 
49
        out, err = self.run_bzr('shelve --list', retcode=1)
50
50
        self.assertEqual('', err)
51
51
        self.assertEqual('  2: Bar\n  1: Foo\n', out)