~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests.py

  • Committer: Michael Ellerman
  • Date: 2006-06-13 13:20:44 UTC
  • mto: (0.6.1 shelf-win32)
  • mto: This revision was merged to the branch mainline in revision 396.
  • Revision ID: michael@ellerman.id.au-20060613132044-56aea0e248d5c8d2
Fix error handling for non-int patch arguments

Show diffs side-by-side

added added

removed removed

Lines of Context:
526
526
        # Check that worked
527
527
        self.assertTrue(os.path.exists('.shelf/shelves/default/01'))
528
528
        self.assertFalse(os.path.exists('.shelf/shelves/other/01'))
 
529
 
 
530
    def test_shelf_bad_patch_arg(self):
 
531
        self.tree = self.make_branch_and_tree('.')
 
532
 
 
533
        # Check the bad arg handling
 
534
        stdout, error = self.run_bzr_captured(['unshelve', '01'], retcode=3)
 
535
        self.assertTrue("Patch '01' doesn't exist on shelf" in error)
 
536
 
 
537
        stdout, error = self.run_bzr_captured(['unshelve', 'foo'], retcode=3)
 
538
        self.assertTrue("Invalid patch name 'foo'" in error)
 
539
 
 
540
        # Hex and is cracky, so it shouldn't work
 
541
        stdout, error = self.run_bzr_captured(['unshelve', '0x00'], retcode=3)
 
542
        self.assertTrue("Invalid patch name '0x00'" in error)