Patchwork D7222: run-tests: use byte strings for inserted output

login
register
mail settings
Submitter phabricator
Date Nov. 5, 2019, 4:44 a.m.
Message ID <d54c730664daf5968d6f2ed1bc565a92@localhost.localdomain>
Download mbox | patch
Permalink /patch/42741/
State Not Applicable
Headers show

Comments

phabricator - Nov. 5, 2019, 4:44 a.m.
Closed by commit rHGd9e7ac50b80a: run-tests: use byte strings for inserted output (authored by indygreg).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7222?vs=17541&id=17544

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7222/new/

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

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1770,7 +1770,9 @@ 
             if l.startswith(b'#require'):
                 lsplit = l.split()
                 if len(lsplit) < 2 or lsplit[0] != b'#require':
-                    after.setdefault(pos, []).append('  !!! invalid #require\n')
+                    after.setdefault(pos, []).append(
+                        b'  !!! invalid #require\n'
+                    )
                 if not skipping:
                     haveresult, message = self._hghave(lsplit[1:])
                     if not haveresult:
@@ -1780,19 +1782,19 @@ 
             elif l.startswith(b'#if'):
                 lsplit = l.split()
                 if len(lsplit) < 2 or lsplit[0] != b'#if':
-                    after.setdefault(pos, []).append('  !!! invalid #if\n')
+                    after.setdefault(pos, []).append(b'  !!! invalid #if\n')
                 if skipping is not None:
-                    after.setdefault(pos, []).append('  !!! nested #if\n')
+                    after.setdefault(pos, []).append(b'  !!! nested #if\n')
                 skipping = not self._iftest(lsplit[1:])
                 after.setdefault(pos, []).append(l)
             elif l.startswith(b'#else'):
                 if skipping is None:
-                    after.setdefault(pos, []).append('  !!! missing #if\n')
+                    after.setdefault(pos, []).append(b'  !!! missing #if\n')
                 skipping = not skipping
                 after.setdefault(pos, []).append(l)
             elif l.startswith(b'#endif'):
                 if skipping is None:
-                    after.setdefault(pos, []).append('  !!! missing #if\n')
+                    after.setdefault(pos, []).append(b'  !!! missing #if\n')
                 skipping = None
                 after.setdefault(pos, []).append(l)
             elif skipping:
@@ -1841,7 +1843,7 @@ 
         if inpython:
             script.append(b'EOF\n')
         if skipping is not None:
-            after.setdefault(pos, []).append('  !!! missing #endif\n')
+            after.setdefault(pos, []).append(b'  !!! missing #endif\n')
         addsalt(n + 1, False)
         # Need to end any current per-command trace
         if activetrace: