~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests.py

  • Committer: Michael Ellerman
  • Date: 2005-11-29 07:42:32 UTC
  • mto: (0.3.1 shelf-dev) (325.1.2 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 334.
  • Revision ID: michael@ellerman.id.au-20051129074232-20834022c63c9cf2
Update tests for new return codes from error commands.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
                self.DIFF_HEADER + self.DIFF_1 + '\n')
51
51
 
52
52
            # Shelve the changes
53
 
            self.run_bzr('shelve', retcode=True)
 
53
            self.run_bzr('shelve', retcode=0)
54
54
 
55
55
            # Make sure there is no diff anymore
56
56
            self.assertEqual(self.capture('diff', retcode=0), '')
63
63
            self.assertEqual(shelf, self.DIFF_1)
64
64
 
65
65
            # Unshelve
66
 
            self.run_bzr('unshelve', retcode=True)
 
66
            self.run_bzr('unshelve', retcode=0)
67
67
 
68
68
            # Check the diff is right again
69
69
            self.assertEqual(self.capture('diff', retcode=1),
83
83
        b.working_tree().commit(message='add test_file')
84
84
 
85
85
        # Shelve the changes
86
 
        self.run_bzr('shelve', retcode=True)
 
86
        self.run_bzr('shelve', retcode=1)
87
87
 
88
88
        if b._transport.has('.bzr/x-shelf/default/00'):
89
89
            self.fail("Shelf exists, but it shouldn't")
102
102
        b.working_tree().commit(message='update test_file')
103
103
 
104
104
        # Shelve the changes
105
 
        self.run_bzr('shelve', '-r', '1', retcode=True)
 
105
        self.run_bzr('shelve', '-r', '1', retcode=0)
106
106
 
107
107
        # Check the diff is right
108
108
        self.assertEqual(self.capture('diff', retcode=1),
112
112
        self.assertEqual(file('test_file').read(), self.ORIGINAL)
113
113
 
114
114
        # Unshelve
115
 
        self.run_bzr('unshelve', retcode=True)
 
115
        self.run_bzr('unshelve', retcode=0)
116
116
 
117
117
        # Make sure the file is back the way it should be
118
118
        self.assertEqual(file('test_file').read(), self.MODIFIED)