aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangformat/tests/clangformat-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/clangformat/tests/clangformat-test.cpp')
-rw-r--r--src/plugins/clangformat/tests/clangformat-test.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/clangformat/tests/clangformat-test.cpp b/src/plugins/clangformat/tests/clangformat-test.cpp
index 80d2cc4da9..a4a85cf906 100644
--- a/src/plugins/clangformat/tests/clangformat-test.cpp
+++ b/src/plugins/clangformat/tests/clangformat-test.cpp
@@ -730,4 +730,20 @@ void ClangFormatTest::testIndentCommentOnNewLine()
}));
}
+void ClangFormatTest::testUtf8SymbolLine()
+{
+ insertLines({"int main()",
+ "{",
+ " cout << \"ä\" << endl;",
+ " return 0;",
+ "}"});
+ m_indenter->indent(*m_cursor, QChar::Null, TextEditor::TabSettings());
+ QCOMPARE(documentLines(),
+ (std::vector<QString>{"int main()",
+ "{",
+ " cout << \"ä\" << endl;",
+ " return 0;",
+ "}"}));
+}
+
} // namespace ClangFormat::Internal