~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to testweave.py

  • Committer: Martin Pool
  • Date: 2005-06-28 13:31:41 UTC
  • mto: This revision was merged to the branch mainline in revision 852.
  • Revision ID: mbp@sourcefrog.net-20050628133141-94b29d13e780312d
Fix weave line calculation when making deltas

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
                            'line 1'])
104
104
        
105
105
        self.assertEquals(list(changes),
106
 
                          [(0, 0, ['top line'])])
 
106
                          [(1, 1, ['top line'])])
107
107
 
108
108
 
109
109
 
124
124
    Look at the annotations to make sure that the first line is matched
125
125
    and not stored repeatedly."""
126
126
    def runTest(self):
127
 
        return ########################## SKIPPED
128
 
        
129
127
        k = Weave()
130
128
 
131
129
        k.add([], ['line 1'])
148
146
                         [(0, 'line 1'),
149
147
                          (2, 'diverged line')])
150
148
 
 
149
        text3 = ['line 1', 'middle line', 'line 2']
151
150
        k.add([0, 1],
152
 
              ['line 1', 'middle line', 'line 2'])
 
151
              text3)
 
152
 
 
153
        from pprint import pformat
 
154
 
 
155
        self.log("changes to text3: " + pformat(list(k._delta(set([0, 1]), text3))))
 
156
 
 
157
        self.log("k._l=" + pformat(k._l))
153
158
 
154
159
        self.assertEqual(k.annotate(3),
155
160
                         [(0, 'line 1'),