Patchwork D8782: tests: make flag parsing test more future safe

login
register
mail settings
Submitter phabricator
Date July 21, 2020, 8:14 p.m.
Message ID <differential-rev-PHID-DREV-pwdg5rl2jpw53mwoowyx-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46826/
State New
Headers show

Comments

phabricator - July 21, 2020, 8:14 p.m.
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8782

AFFECTED FILES
  tests/test-revlog-v2.t

CHANGE DETAILS




To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-revlog-v2.t b/tests/test-revlog-v2.t
--- a/tests/test-revlog-v2.t
+++ b/tests/test-revlog-v2.t
@@ -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 ..