Mercurial > public > mercurial-scm > hg-stable
comparison tests/test-simplemerge.py @ 17513:d08b333816c6
spelling: sentinel
author | timeless@mozdev.org |
---|---|
date | Fri, 17 Aug 2012 13:58:19 -0700 |
parents | 7de7630053cb |
children | f18830651811 |
comparison
equal
deleted
inserted
replaced
17512:39e7e74b3cd3 | 17513:d08b333816c6 |
---|---|
136 def test_front_insert(self): | 136 def test_front_insert(self): |
137 m3 = Merge3(['zz'], | 137 m3 = Merge3(['zz'], |
138 ['aaa', 'bbb', 'zz'], | 138 ['aaa', 'bbb', 'zz'], |
139 ['zz']) | 139 ['zz']) |
140 | 140 |
141 # todo: should use a sentinal at end as from get_matching_blocks | 141 # todo: should use a sentinel at end as from get_matching_blocks |
142 # to match without zz | 142 # to match without zz |
143 self.assertEquals(list(m3.find_sync_regions()), | 143 self.assertEquals(list(m3.find_sync_regions()), |
144 [(0, 1, 2, 3, 0, 1), | 144 [(0, 1, 2, 3, 0, 1), |
145 (1, 1, 3, 3, 1, 1)]) | 145 (1, 1, 3, 3, 1, 1)]) |
146 | 146 |
154 | 154 |
155 def test_null_insert(self): | 155 def test_null_insert(self): |
156 m3 = Merge3([], | 156 m3 = Merge3([], |
157 ['aaa', 'bbb'], | 157 ['aaa', 'bbb'], |
158 []) | 158 []) |
159 # todo: should use a sentinal at end as from get_matching_blocks | 159 # todo: should use a sentinel at end as from get_matching_blocks |
160 # to match without zz | 160 # to match without zz |
161 self.assertEquals(list(m3.find_sync_regions()), | 161 self.assertEquals(list(m3.find_sync_regions()), |
162 [(0, 0, 2, 2, 0, 0)]) | 162 [(0, 0, 2, 2, 0, 0)]) |
163 | 163 |
164 self.assertEquals(list(m3.merge_regions()), | 164 self.assertEquals(list(m3.merge_regions()), |