~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_shelf_ui.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-16 20:58:34 UTC
  • mfrom: (4899.2.3 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20091216205834-29l2k9dk6pg7s6th
(nmb) Improved feedback from 'bzr unshelve' (bug #496917)

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
""")