diff --git a/tests/run-tests.py b/tests/run-tests.py
index ea7ad8c3988aa27266b24b3cc1a52bcdcb91b0e0_dGVzdHMvcnVuLXRlc3RzLnB5..518dd70d1a6ed993e364256d7cfcdbdc0b876996_dGVzdHMvcnVuLXRlc3RzLnB5 100755
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -531,5 +531,28 @@
     postout = []
     ret = 0
     for n, l in enumerate(output):
-        if l.startswith(salt):
+        lout, lcmd = l, None
+        if salt in l:
+            lout, lcmd = l.split(salt, 1)
+
+        if lout:
+            if lcmd:
+                lout += ' (no-eol)\n'
+
+            el = None
+            if pos in expected and expected[pos]:
+                el = expected[pos].pop(0)
+
+            if el == lout: # perfect match (fast)
+                postout.append("  " + lout)
+            elif el and el.decode('string-escape') == l:
+                postout.append("  " + el)  # \-escape match
+            elif (el and
+                  (el.endswith(" (re)\n") and rematch(el[:-6] + '\n', lout) or
+                   el.endswith(" (glob)\n") and globmatch(el[:-8] + '\n', lout))):
+                postout.append("  " + el) # fallback regex/glob match
+            else:
+                postout.append("  " + lout) # let diff deal with it
+
+        if lcmd:
             # add on last return code
@@ -535,6 +558,6 @@
             # add on last return code
-            ret = int(l.split()[2])
+            ret = int(lcmd.split()[1])
             if ret != 0:
                 postout.append("  [%s]\n" % ret)
             if pos in after:
                 postout += after.pop(pos)
@@ -537,23 +560,8 @@
             if ret != 0:
                 postout.append("  [%s]\n" % ret)
             if pos in after:
                 postout += after.pop(pos)
-            pos = int(l.split()[1])
-        else:
-            el = None
-            if pos in expected and expected[pos]:
-                el = expected[pos].pop(0)
-
-            if el == l: # perfect match (fast)
-                postout.append("  " + l)
-            elif el and el.decode('string-escape') == l:
-                postout.append("  " + el)  # \-escape match
-            elif (el and
-                  (el.endswith(" (re)\n") and rematch(el[:-6] + '\n', l) or
-                   el.endswith(" (glob)\n") and globmatch(el[:-8] + '\n', l))):
-                postout.append("  " + el) # fallback regex/glob match
-            else:
-                postout.append("  " + l) # let diff deal with it
+            pos = int(lcmd.split()[0])
 
     if pos in after:
         postout += after.pop(pos)
diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t
index ea7ad8c3988aa27266b24b3cc1a52bcdcb91b0e0_dGVzdHMvdGVzdC1ydW4tdGVzdHMudA==..518dd70d1a6ed993e364256d7cfcdbdc0b876996_dGVzdHMvdGVzdC1ydW4tdGVzdHMudA== 100644
--- a/tests/test-run-tests.t
+++ b/tests/test-run-tests.t
@@ -2,6 +2,8 @@
 
   $ echo foo
   foo
+  $ printf 'oh no'
+  oh no (no-eol)
   $ printf 'bar\nbaz\n' | cat
   bar
   baz