# HG changeset patch # User Gregory Szorc # Date 2018-01-11 03:04:52 # Node ID 31acf6619f0892ea3efbdc17b008b1c896d5b7c7 # Parent af25237be091ac307bc65a2c2b3688fd73eb9bf3 run-tests: fix regular expression for path test The previous regexp would match the empty string. This fixes a mistake added in 964212780daf. Differential Revision: https://phab.mercurial-scm.org/D1843 diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -2450,7 +2450,7 @@ class TestRunner(object): # If it looks like our in-repo Rust binary, use the source root. # This is a bit hacky. But rhg is still not supported outside the # source directory. So until it is, do the simple thing. - elif re.search(b'|/rust/target/[^/]+/hg', normbin): + elif re.search(b'/rust/target/[^/]+/hg', normbin): self._pythondir = os.path.dirname(self._testdir) # Fall back to the legacy behavior. else: