diff options
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 5c526c12e12..318f5b4a7cd 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -9133,5 +9133,18 @@ TEST_F(FormatTest, HandleConflictMarkers) { "int i;\n")); } +TEST_F(FormatTest, DisableRegions) { + EXPECT_EQ("int i;\n" + "// clang-format off\n" + " int j;\n" + "// clang-format on\n" + "int k;", + format(" int i;\n" + " // clang-format off\n" + " int j;\n" + " // clang-format on\n" + " int k;")); +} + } // end namespace tooling } // end namespace clang |