~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/shelf_tests.py

  • Committer: Aaron Bentley
  • Date: 2006-06-18 01:24:25 UTC
  • mfrom: (0.3.3 shelf-dev)
  • Revision ID: aaron.bentley@utoronto.ca-20060618012425-61c3d9d62a2cc971
Merged the latest Shelf changes, patches.py no longer needed.

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)