]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
tests : write to binary buffer to avoid newline translation in jinja -py [no ci]...
authorSigbjørn Skjæret <redacted>
Mon, 16 Mar 2026 19:40:22 +0000 (20:40 +0100)
committerGitHub <redacted>
Mon, 16 Mar 2026 19:40:22 +0000 (20:40 +0100)
tests/test-jinja.cpp

index 05ea8ca9e926c9c3d884c7435fab9e5d88f222bb..23af1ec8278f96b9b746a977f0653c859978ab97 100644 (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) {