File: Text.cpp

package info (click to toggle)
hyprtoolkit 0.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,664 kB
  • sloc: cpp: 11,582; xml: 337; sh: 17; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 555 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <gtest/gtest.h>

#include <element/text/Text.hpp>
#include <hyprtoolkit/core/Backend.hpp>

#include "../tricks/Tricks.hpp"

using namespace Hyprtoolkit;

TEST(Element, text) {
    Tests::Tricks::createBackendSupport();

    auto text = CTextBuilder::begin()->text(R"(Hello <a href="https://hypr.land">link</a>! Hi <a href="https://hypr.land">link2</a>!)")->commence();

    EXPECT_EQ(text->m_impl->parsedText, "Hello <u><span foreground=\"#4eecf8ff\">link</span></u>! Hi <u><span foreground=\"#4eecf8ff\">link2</span></u>!");

    text.reset();
}