~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to shelf_tests.py

  • Committer: Aaron Bentley
  • Date: 2005-12-12 16:59:40 UTC
  • mfrom: (296.1.2 bzrtools)
  • Revision ID: abentley@panoramicfeedback.com-20051212165940-f1e2875b71f848ab
Fix for extremely long filenames in shelve

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
        file('filename', 'wb').write('goodbye')
138
138
        self.run_bzr('shelve', '--all', 'filename', retcode=1)
139
139
        os.chdir('..')
 
140
 
 
141
    def test_long_filename(self):
 
142
        """Regression test for diffstat with long filenames.
 
143
 
 
144
        Create a branch with two files, one of which has a long name. Commit.
 
145
        Modify both files. Shelve the file with the short name. If diffstat
 
146
        has regressed, it will generate a diffstat of the file with the long
 
147
        name, and break.
 
148
        """
 
149
        self.run_bzr('init')
 
150
        filename = 'a' * 80
 
151
        file(filename, 'wb').write('hello')
 
152
        file('foo', 'wb').write('bar')
 
153
        self.run_bzr('add')
 
154
        self.run_bzr('commit', '-m', 'added')
 
155
        file(filename, 'wb').write('goodbye')
 
156
        file('foo', 'wb').write('baz')
 
157
        self.run_bzr('shelve', '--all', 'foo', retcode=1)
 
158