Skip to content

Commit 9379922

Browse files
authored
[llvm][mustache] Precommit test for StandaloneIndentation (#159184)
1 parent 0dc5d2e commit 9379922

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

llvm/unittests/Support/MustacheTest.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,16 @@ TEST(MustachePartials, PaddingWhitespace) {
991991
EXPECT_EQ("|[]|", Out);
992992
}
993993

994+
TEST(MustachePartials, StandaloneIndentation) {
995+
Value D = Object{{"content", "<\n->"}};
996+
auto T = Template("\\\n {{>partial}}\n/\n");
997+
T.registerPartial("partial", "|\n{{{content}}}\n|\n");
998+
std::string Out;
999+
raw_string_ostream OS(Out);
1000+
T.render(D, OS);
1001+
EXPECT_NE("\\\n |\n <\n ->\n |\n/\n", Out);
1002+
}
1003+
9941004
TEST(MustacheLambdas, BasicInterpolation) {
9951005
Value D = Object{};
9961006
auto T = Template("Hello, {{lambda}}!");

0 commit comments

Comments
 (0)