/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_shelf_ui.py

  • Committer: Andrew Bennetts
  • Date: 2010-01-08 00:05:01 UTC
  • mfrom: (4938 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4948.
  • Revision ID: andrew.bennetts@canonical.com-20100108000501-8fj5j5ub6j5bd3es
MergeĀ lp:bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    revision,
26
26
    tests,
27
27
)
 
28
from bzrlib.tests import script
28
29
 
29
30
 
30
31
class ExpectShelver(shelf_ui.Shelver):
530
531
        self.assertRaises(errors.InvalidShelfId,
531
532
            shelf_ui.Unshelver.from_args, directory='tree',
532
533
            action='delete-only', shelf_id='foo')
 
534
 
 
535
 
 
536
class TestUnshelveScripts(TestUnshelver, 
 
537
                          script.TestCaseWithTransportAndScript): 
 
538
 
 
539
    def test_unshelve_messages_keep(self):
 
540
        self.create_tree_with_shelf()
 
541
        self.run_script("""
 
542
$ cd tree
 
543
$ bzr unshelve --keep
 
544
2>Using changes with id "1".
 
545
2> M  foo
 
546
2>All changes applied successfully.
 
547
""")
 
548
 
 
549
    def test_unshelve_messages_delete(self):
 
550
        self.create_tree_with_shelf()
 
551
        self.run_script("""
 
552
$ cd tree
 
553
$ bzr unshelve --delete-only
 
554
2>Deleted changes with id "1".
 
555
""")
 
556
 
 
557
    def test_unshelve_messages_apply(self):
 
558
        self.create_tree_with_shelf()
 
559
        self.run_script("""
 
560
$ cd tree
 
561
$ bzr unshelve --apply
 
562
2>Using changes with id "1".
 
563
2> M  foo
 
564
2>All changes applied successfully.
 
565
2>Deleted changes with id "1".
 
566
""")
 
567
 
 
568
    def test_unshelve_messages_dry_run(self):
 
569
        self.create_tree_with_shelf()
 
570
        self.run_script("""
 
571
$ cd tree
 
572
$ bzr unshelve --dry-run
 
573
2>Using changes with id "1".
 
574
2> M  foo
 
575
""")