~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests.py

  • Committer: Michael Ellerman
  • Date: 2005-12-12 17:33:26 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-20051212173326-44a01d94f544228a
Merge Dafydd Harries' fix for long filenames in diffstat

Show diffs side-by-side

added added

removed removed

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