[gnote] Add test for split_title_from_content



commit 714f638f51b0a36a84524754daea7632551add46
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Mon Apr 13 16:06:54 2020 +0300

    Add test for split_title_from_content

 src/test/unit/notemanagerutests.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/test/unit/notemanagerutests.cpp b/src/test/unit/notemanagerutests.cpp
index 025b5588..59a1bec0 100644
--- a/src/test/unit/notemanagerutests.cpp
+++ b/src/test/unit/notemanagerutests.cpp
@@ -46,6 +46,18 @@ SUITE(NoteManager)
   };
 
 
+  TEST(split_title_from_content)
+  {
+    Glib::ustring body;
+    auto title = gnote::NoteManagerBase::split_title_from_content("test", body);
+    CHECK_EQUAL("test", title);
+    CHECK(body.empty());
+
+    title = gnote::NoteManagerBase::split_title_from_content("test\ncontent", body);
+    CHECK_EQUAL("test", title);
+    CHECK_EQUAL("content", body);
+  }
+
   TEST_FIXTURE(Fixture, create_no_args)
   {
     auto note1 = manager.create();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]