diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-08-15 14:25:29 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-09-14 08:51:09 +0300 |
commit | d9802226e443ecd7a7062fd7a0fb320a183e341f (patch) | |
tree | 1cfd97905fa7ba4de4beca9802ba749d62b5cc4e /src/bookmarks/test/bookmarkmanager.cpp | |
parent | Import BookmarkModel from poi (diff) | |
download | rekonq-d9802226e443ecd7a7062fd7a0fb320a183e341f.tar.xz |
Migrate BookmarkManager
Diffstat (limited to 'src/bookmarks/test/bookmarkmanager.cpp')
-rw-r--r-- | src/bookmarks/test/bookmarkmanager.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/bookmarks/test/bookmarkmanager.cpp b/src/bookmarks/test/bookmarkmanager.cpp new file mode 100644 index 00000000..5bfaf649 --- /dev/null +++ b/src/bookmarks/test/bookmarkmanager.cpp @@ -0,0 +1,21 @@ +#include "../bookmarkmanager.hpp" +#include <QStandardPaths> +#include <gtest/gtest.h> + +// clazy:excludeall=non-pod-global-static + +namespace { +TEST(BookmarkManager, QStandardPaths) +{ + const auto file = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QString::fromLatin1("bookmarks.xbel")); + EXPECT_TRUE(file.isEmpty()) << qUtf8Printable(file); +} + +TEST(BookmarkManager, Manager) +{ + BookmarkManager manager("bookmarks.xbel"); + + const auto load_errors = manager.errors(); + EXPECT_EQ(load_errors.length(), 0) << qUtf8Printable(load_errors.join('\n')); +} +} // namespace
\ No newline at end of file |