From 7ddc3998b9858c35e38dea19a2ce0563956ec148 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 6 Oct 2023 00:10:03 +0200 Subject: Add qm formatted text test --- tests/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/main.cpp b/tests/main.cpp index bfece6e..5063c2d 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -141,5 +141,12 @@ int main() { room_ids = matrix_extract_room_ids("@sneed:matrix.org"); assert_equals(room_ids.size(), 0); + Matrix matrix(false); + std::string formatted_body = matrix.body_to_formatted_body(nullptr, "hello world"); + assert_equals(formatted_body, "hello world"); + + std::string qm_text = formatted_text_to_qm_text(&matrix, formatted_body.c_str(), formatted_body.size(), true); + assert_equals(qm_text, "hello world"); + return 0; } -- cgit v1.2.3