Mercurial > hg
comparison tests/test-parseindex2.py @ 39067:daedb70fd467
tests: add test coverage for revlogindex[-1] which was previously missing
Differential Revision: https://phab.mercurial-scm.org/D4184
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 09 Aug 2018 13:20:42 -0400 |
parents | d722020bbd9d |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
39066:2488dcfa71f8 | 39067:daedb70fd467 |
---|---|
205 'Reverse lookup inconsistent for %r' % nodemod.hex(r[7])) | 205 'Reverse lookup inconsistent for %r' % nodemod.hex(r[7])) |
206 except TypeError: | 206 except TypeError: |
207 # pure version doesn't support this | 207 # pure version doesn't support this |
208 break | 208 break |
209 | 209 |
210 def testminusone(self): | |
211 want = (0, 0, 0, -1, -1, -1, -1, nullid) | |
212 index, junk = parsers.parse_index2(data_inlined, True) | |
213 got = index[-1] | |
214 self.assertEqual(want, got) # inline data | |
215 | |
216 index, junk = parsers.parse_index2(data_non_inlined, False) | |
217 got = index[-1] | |
218 self.assertEqual(want, got) # no inline data | |
219 | |
210 if __name__ == '__main__': | 220 if __name__ == '__main__': |
211 import silenttestrunner | 221 import silenttestrunner |
212 silenttestrunner.main(__name__) | 222 silenttestrunner.main(__name__) |