tests: make flag parsing test more future safe
authorJoerg Sonnenberger <joerg@bec.de>
Tue, 21 Jul 2020 22:13:54 +0200
changeset 45370 15d35f2ba474
parent 45369 5178dd2233d0
child 45371 e58e234096de
tests: make flag parsing test more future safe The revlog format contains a number of feature flags, e.g. if general deltas are active. When testing that unknown flags are rejected, use bits that are not immediately following the currently used bits. Differential Revision: https://phab.mercurial-scm.org/D8782
tests/test-revlog-v2.t
--- a/tests/test-revlog-v2.t	Tue Jul 28 09:58:28 2020 -0700
+++ b/tests/test-revlog-v2.t	Tue Jul 21 22:13:54 2020 +0200
@@ -32,10 +32,10 @@
 Unknown flags to revlog are rejected
 
   >>> with open('.hg/store/00changelog.i', 'wb') as fh:
-  ...     fh.write(b'\x00\x04\xde\xad') and None
+  ...     fh.write(b'\xff\x00\xde\xad') and None
 
   $ hg log
-  abort: unknown flags (0x04) in version 57005 revlog 00changelog.i!
+  abort: unknown flags (0xff00) in version 57005 revlog 00changelog.i!
   [255]
 
   $ cd ..