[llvm-branch-commits] [llvm] [llvm][mustache] Precommit test for StandaloneIndentation (PR #159184)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Sep 22 10:07:42 PDT 2025
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/159184
>From db6bc75e9aab9307b3443047ff2c42ccc4d76270 Mon Sep 17 00:00:00 2001
From: Paul Kirth <paulkirth at google.com>
Date: Fri, 29 Aug 2025 22:30:51 -0700
Subject: [PATCH] [llvm][mustache] Precommit test for StandaloneIndentation
---
llvm/unittests/Support/MustacheTest.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/llvm/unittests/Support/MustacheTest.cpp b/llvm/unittests/Support/MustacheTest.cpp
index fb8478f368783..02eaed4244cc7 100644
--- a/llvm/unittests/Support/MustacheTest.cpp
+++ b/llvm/unittests/Support/MustacheTest.cpp
@@ -991,6 +991,16 @@ TEST(MustachePartials, PaddingWhitespace) {
EXPECT_EQ("|[]|", Out);
}
+TEST(MustachePartials, StandaloneIndentation) {
+ Value D = Object{{"content", "<\n->"}};
+ auto T = Template("\\\n {{>partial}}\n/\n");
+ T.registerPartial("partial", "|\n{{{content}}}\n|\n");
+ std::string Out;
+ raw_string_ostream OS(Out);
+ T.render(D, OS);
+ EXPECT_NE("\\\n |\n <\n ->\n |\n/\n", Out);
+}
+
TEST(MustacheLambdas, BasicInterpolation) {
Value D = Object{};
auto T = Template("Hello, {{lambda}}!");
More information about the llvm-branch-commits
mailing list