D4184: tests: add test coverage for revlogindex[-1] which was previously missing
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Aug 9 17:42:31 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4184
AFFECTED FILES
tests/test-parseindex2.py
CHANGE DETAILS
diff --git a/tests/test-parseindex2.py b/tests/test-parseindex2.py
--- a/tests/test-parseindex2.py
+++ b/tests/test-parseindex2.py
@@ -206,6 +206,17 @@
# pure version doesn't support this
break
+ def testminusone(self):
+ self.maxDiff = None
+ 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__)
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list