[llvm] [llvm][mustache] Precommit test for StandaloneIndentation (PR #159184)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 24 13:47:22 PDT 2025
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/159184
>From 5fa6844c31ccb07dd2df584ddd96195c98d324b8 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-commits
mailing list