diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-10-06 00:10:03 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-10-06 00:10:03 +0200 |
commit | 7ddc3998b9858c35e38dea19a2ce0563956ec148 (patch) | |
tree | 2fed6fd622e34c4ecbdf40b9c4675019dc9fd1dd | |
parent | f0a020814794a14760d5aa90493117ea3667e61f (diff) |
Add qm formatted text test
-rw-r--r-- | tests/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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; } |