mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
20 lines
485 B
C++
20 lines
485 B
C++
|
#include "util/XDGDesktopFile.hpp"
|
||
|
|
||
|
#include <gtest/gtest.h>
|
||
|
#include <QDebug>
|
||
|
|
||
|
using namespace chatterino;
|
||
|
|
||
|
TEST(XDGDesktopFile, String)
|
||
|
{
|
||
|
auto desktopFile = XDGDesktopFile(":/001-mimeapps.list");
|
||
|
auto entries = desktopFile.getEntries("Default Applications");
|
||
|
|
||
|
ASSERT_EQ(entries["thisshould"], "");
|
||
|
|
||
|
ASSERT_EQ(entries["lol"], "");
|
||
|
ASSERT_EQ(entries["x-scheme-handler/http"], QString("firefox.desktop"));
|
||
|
|
||
|
ASSERT_EQ(desktopFile.getEntries("test").size(), 2);
|
||
|
}
|