~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to testweave.py

  • Committer: Martin Pool
  • Date: 2005-06-28 09:21:30 UTC
  • mto: This revision was merged to the branch mainline in revision 852.
  • Revision ID: mbp@sourcefrog.net-20050628092130-b3b669cc920a7cdd
Basic parsing of delete instructions.

Check that they don't interfere with extracting revisions composed only of 
insertions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
                          (4, 'ccc')])
161
161
 
162
162
 
 
163
 
 
164
class CannedDelete(TestBase):
 
165
    """Unpack canned weave with deleted lines."""
 
166
    def runTest(self):
 
167
        k = Weave()
 
168
 
 
169
        k._v = [VerInfo([]),
 
170
                VerInfo([0]),
 
171
                ]
 
172
        k._l = [('{', 0),
 
173
                'first line',
 
174
                ('[', 1),
 
175
                'line to be deleted',
 
176
                (']', 1),
 
177
                'last line',
 
178
                ('}', 0),
 
179
                ]
 
180
 
 
181
        self.assertEqual(k.get(0),
 
182
                         ['first line',
 
183
                          'line to be deleted',
 
184
                          'last line',
 
185
                          ])
 
186
 
 
187
 
 
188
 
163
189
class BadWeave(TestBase):
164
190
    """Test that we trap an insert which should not occur."""
165
191
    def runTest(self):