[libcxx-commits] [libcxx] [llvm] [LIT] remove `to_unicode`, `to_string`, and `to_bytes` helpers (PR #165950)
Alexander Richardson via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 3 05:36:25 PST 2025
================
@@ -1405,14 +1385,14 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
for k, v in test.config.environment.items()
if k.startswith("DYLD_")
)
- f.write(bytes(env_str, "utf-8") if mode == "wb" else env_str)
- f.write(b"set -x;" if mode == "wb" else "set -x;")
- if mode == "wb":
- f.write(bytes("{ " + "; } &&\n{ ".join(commands) + "; }", "utf-8"))
- else:
+
+ with open(script, "w", encoding="utf-8", newline="") as f:
----------------
arichardson wrote:
Could also write bytes here instead of setting newline?
https://github.com/llvm/llvm-project/pull/165950
More information about the libcxx-commits
mailing list