summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestProto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTestProto.cpp')
-rw-r--r--clang/unittests/Format/FormatTestProto.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp
index 1d6b7502e09..6db44c765b4 100644
--- a/clang/unittests/Format/FormatTestProto.cpp
+++ b/clang/unittests/Format/FormatTestProto.cpp
@@ -478,5 +478,17 @@ TEST_F(FormatTestProto, FormatsRepeatedListInitializersInOptions) {
"};");
}
+TEST_F(FormatTestProto, AcceptsOperatorAsKeyInOptions) {
+ verifyFormat("option (MyProto.options) = {\n"
+ " bbbbbbbbb: <\n"
+ " ccccccccccccccccccccccc: <\n"
+ " operator: 1\n"
+ " operator: 2\n"
+ " operator { key: value }\n"
+ " >\n"
+ " >\n"
+ "};");
+}
+
} // end namespace tooling
} // end namespace clang
OpenPOWER on IntegriCloud