~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests.py

  • Committer: Michael Ellerman
  • Date: 2006-03-11 13:19:21 UTC
  • mto: (325.1.2 bzrtools) (0.3.1 shelf-dev)
  • mto: This revision was merged to the branch mainline in revision 334.
  • Revision ID: michael@ellerman.id.au-20060311131921-8565bcc3ac4a10b6
I'm sure someone will complain about this, but remove the diffstat after
shelve/unshelve. If you want diffstat after shelve/unshelve then run diffstat!
Make the shelve and unshelve messages symmetrical, and make sure if there's
no message in the patch we print something when unshelving.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
        self.assertEqual(stderr.split('\n')[0],
122
122
            'bzr: ERROR: shelve only accepts a single revision parameter.')
123
123
 
124
 
    def test_shelf_long_filename(self):
125
 
        """Regression test for diffstat with long filenames.
126
 
 
127
 
        Create a branch with two files, one of which has a long name. Commit.
128
 
        Modify both files. Shelve the file with the short name. If diffstat
129
 
        has regressed, it will generate a diffstat of the file with the long
130
 
        name, and break.
131
 
        """
132
 
        self.run_bzr('init')
133
 
        filename = 'a' * 80
134
 
        file(filename, 'wb').write('hello')
135
 
        file('foo', 'wb').write('bar')
136
 
        self.run_bzr('add')
137
 
        self.run_bzr('commit', '-m', 'added')
138
 
        file(filename, 'wb').write('goodbye')
139
 
        file('foo', 'wb').write('baz')
140
 
        self.run_bzr('shelve', 'foo', retcode=0)
141
 
 
142
124
    def test_shelf_show_basic(self):
143
125
        tree = self.make_branch_and_tree('.')
144
126
        self.__create_and_add_test_file(tree)