/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: John Arbash Meinel
  • Date: 2010-01-12 22:36:23 UTC
  • mfrom: (4953 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4955.
  • Revision ID: john@arbash-meinel.com-20100112223623-836x5mou0gm5vsep
merge bzr.dev 4953 to clean up the ui factory issues

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    revision,
27
27
    tests,
28
28
)
 
29
from bzrlib.tests import script
29
30
 
30
31
 
31
32
class ExpectShelver(shelf_ui.Shelver):
563
564
        self.assertRaises(errors.InvalidShelfId,
564
565
            shelf_ui.Unshelver.from_args, directory='tree',
565
566
            action='delete-only', shelf_id='foo')
 
567
 
 
568
 
 
569
class TestUnshelveScripts(TestUnshelver, 
 
570
                          script.TestCaseWithTransportAndScript): 
 
571
 
 
572
    def test_unshelve_messages_keep(self):
 
573
        self.create_tree_with_shelf()
 
574
        self.run_script("""
 
575
$ cd tree
 
576
$ bzr unshelve --keep
 
577
2>Using changes with id "1".
 
578
2> M  foo
 
579
2>All changes applied successfully.
 
580
""")
 
581
 
 
582
    def test_unshelve_messages_delete(self):
 
583
        self.create_tree_with_shelf()
 
584
        self.run_script("""
 
585
$ cd tree
 
586
$ bzr unshelve --delete-only
 
587
2>Deleted changes with id "1".
 
588
""")
 
589
 
 
590
    def test_unshelve_messages_apply(self):
 
591
        self.create_tree_with_shelf()
 
592
        self.run_script("""
 
593
$ cd tree
 
594
$ bzr unshelve --apply
 
595
2>Using changes with id "1".
 
596
2> M  foo
 
597
2>All changes applied successfully.
 
598
2>Deleted changes with id "1".
 
599
""")
 
600
 
 
601
    def test_unshelve_messages_dry_run(self):
 
602
        self.create_tree_with_shelf()
 
603
        self.run_script("""
 
604
$ cd tree
 
605
$ bzr unshelve --dry-run
 
606
2>Using changes with id "1".
 
607
2> M  foo
 
608
""")