diff options
Diffstat (limited to 'clang/unittests/Format/FormatTestProto.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestProto.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp index 40a069b3f3d..4c61ec1398f 100644 --- a/clang/unittests/Format/FormatTestProto.cpp +++ b/clang/unittests/Format/FormatTestProto.cpp @@ -438,5 +438,35 @@ TEST_F(FormatTestProto, NoSpaceAfterPercent) { "};"); } +TEST_F(FormatTestProto, FormatsRepeatedListInitializersInOptions) { + verifyFormat("option (MyProto.options) = {\n" + " key: item\n" + " keys: [\n" + " 'ala',\n" + " 'bala',\n" + " 'porto',\n" + " 'kala',\n" + " 'too',\n" + " 'long',\n" + " 'long',\n" + " 'long'\n" + " ]\n" + " key: [ item ]\n" + " msg {\n" + " key: item\n" + " keys: [\n" + " 'ala',\n" + " 'bala',\n" + " 'porto',\n" + " 'kala',\n" + " 'too',\n" + " 'long',\n" + " 'long'\n" + " ]\n" + " }\n" + " key: value\n" + "};"); +} + } // end namespace tooling } // end namespace clang |