changeset 42868:35ef1e957a62

run-tests: rename `lout` variable to `out_line` This is clearer and more in line with some other variable names. (This is a gratuitous cleanup that I made while investigating a bug).
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 14 Jun 2019 16:24:34 +0100
parents eab66266180e
children 5ca351ba2478
files tests/run-tests.py
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Fri Jun 14 14:14:17 2019 +0100
+++ b/tests/run-tests.py	Fri Jun 14 16:24:34 2019 +0100
@@ -1612,13 +1612,13 @@
         pos = -1
         postout = []
         for out_rawline in output:
-            lout, lcmd = out_rawline, None
+            out_line, lcmd = out_rawline, None
             if salt in out_rawline:
-                lout, lcmd = out_rawline.split(salt, 1)
-
-            while lout:
-                if not lout.endswith(b'\n'):
-                    lout += b' (no-eol)\n'
+                out_line, lcmd = out_rawline.split(salt, 1)
+
+            while out_line:
+                if not out_line.endswith(b'\n'):
+                    out_line += b' (no-eol)\n'
 
                 # Find the expected output at the current position.
                 els = [None]
@@ -1629,10 +1629,10 @@
                 for i, el in enumerate(els):
                     r = False
                     if el:
-                        r, exact = self.linematch(el, lout)
+                        r, exact = self.linematch(el, out_line)
                     if isinstance(r, str):
                         if r == '-glob':
-                            lout = ''.join(el.rsplit(' (glob)', 1))
+                            out_line = ''.join(el.rsplit(' (glob)', 1))
                             r = '' # Warn only this line.
                         elif r == "retry":
                             postout.append(b'  ' + el)
@@ -1669,10 +1669,10 @@
                         del els[i]
                     postout.append(b'  ' + el)
                 else:
-                    if self.NEEDESCAPE(lout):
-                        lout = TTest._stringescape(b'%s (esc)\n' %
-                                                   lout.rstrip(b'\n'))
-                    postout.append(b'  ' + lout) # Let diff deal with it.
+                    if self.NEEDESCAPE(out_line):
+                        out_line = TTest._stringescape(b'%s (esc)\n' %
+                                                   out_line.rstrip(b'\n'))
+                    postout.append(b'  ' + out_line) # Let diff deal with it.
                     if r != '': # If line failed.
                         warnonly = WARN_NO
                     elif warnonly == WARN_UNDEFINED: