~ruther/qmk_firmware

ref: 9f95577ef2bfff55bf4f5d19c3dc58ea0f09e014 qmk_firmware/tests/unicode/unicode_basic/test_unicode_basic.cpp -rw-r--r-- 542 bytes
9f95577e — Joel Challis OS Detection - Entire file should not be wrapped with ifdef (#23108) 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later

#include "keyboard_report_util.hpp"
#include "keycode.h"
#include "test_common.hpp"
#include "test_keymap_key.hpp"

using testing::_;

class UnicodeBasic : public TestFixture {};

TEST_F(UnicodeBasic, sends_unicode_sequence) {
    TestDriver driver;

    set_unicode_input_mode(UNICODE_MODE_LINUX);

    auto key_uc = KeymapKey(0, 0, 0, UC(0x03A8)); // Ψ

    set_keymap({key_uc});

    EXPECT_UNICODE(driver, 0x03A8);
    tap_key(key_uc);

    VERIFY_AND_CLEAR(driver);
}
Do not follow this link