Mercurial > hg-stable
changeset 39104: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 | 2488dcfa71f8 |
children | 52e9bf215f96 |
files | tests/test-parseindex2.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-parseindex2.py Wed Aug 01 16:28:10 2018 +0300 +++ b/tests/test-parseindex2.py Thu Aug 09 13:20:42 2018 -0400 @@ -207,6 +207,16 @@ # pure version doesn't support this break + def testminusone(self): + want = (0, 0, 0, -1, -1, -1, -1, nullid) + index, junk = parsers.parse_index2(data_inlined, True) + got = index[-1] + self.assertEqual(want, got) # inline data + + index, junk = parsers.parse_index2(data_non_inlined, False) + got = index[-1] + self.assertEqual(want, got) # no inline data + if __name__ == '__main__': import silenttestrunner silenttestrunner.main(__name__)