[llvm] [llvm-lit] Process ANSI color codes in test output when formatting (PR #106776)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 15:14:19 PDT 2024


================
@@ -1016,7 +1054,7 @@ def formatOutput(title, data, limit=None):
     ndashes = 30
     # fmt: off
     out =  f"# .---{title}{'-' * (ndashes - 4 - len(title))}\n"
-    out += f"# | " + "\n# | ".join(data.splitlines()) + "\n"
+    out += formatLines(data.splitlines())
     out += f"# `---{msg}{'-' * (ndashes - 4 - len(msg))}\n"
----------------
arichardson wrote:

How about moving all of this code into the new function?

https://github.com/llvm/llvm-project/pull/106776


More information about the llvm-commits mailing list