write to binary buffer to avoid newline translation

This commit is contained in:
Sigbjørn Skjæret 2026-03-10 22:37:47 +01:00 committed by GitHub
parent 10e5b148b0
commit 7955fb2e5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1915,7 +1915,7 @@ env.globals["raise_exception"] = raise_exception
template = env.from_string(tmpl)
result = template.render(**vars_json)
print(result, end='')
sys.stdout.buffer.write(result.encode())
)";
static void test_template_py(testing & t, const std::string & name, const std::string & tmpl, const json & vars, const std::string & expect) {