[clang-format] Add test for SpacesInLineCommentPrefix. NFC.

Fixes https://github.com/llvm/llvm-project/issues/52649.
This was already fixed in commit e967d97a35.
This commit is contained in:
Marek Kurdej 2022-02-16 13:54:55 +01:00
parent fdd615d4f9
commit fdee512048
1 changed files with 7 additions and 0 deletions

View File

@ -3650,6 +3650,13 @@ TEST_F(FormatTestComments, SpaceAtLineCommentBegin) {
format("// x\n"
"// y",
Style));
EXPECT_EQ(
"// loooooooooooooooooooooooooooooong\n"
"// commentcomments\n"
"// normal comments",
format("// loooooooooooooooooooooooooooooong commentcomments\n"
"// normal comments",
Style));
Style.SpacesInLineCommentPrefix = {3, 3};
EXPECT_EQ("// Lorem ipsum\n"