Unicode, Unicodemap and UCIS refactor (#21659)
This commit is contained in:
parent
95681b8ff4
commit
70e34e491c
34 changed files with 1196 additions and 386 deletions
8
tests/unicode/unicode_basic/config.h
Normal file
8
tests/unicode/unicode_basic/config.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Copyright 2023 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "test_common.h"
|
||||
|
||||
#define UNICODE_SELECTED_MODES UNICODE_MODE_LINUX, UNICODE_MODE_MACOS
|
5
tests/unicode/unicode_basic/test.mk
Normal file
5
tests/unicode/unicode_basic/test.mk
Normal file
|
@ -0,0 +1,5 @@
|
|||
# --------------------------------------------------------------------------------
|
||||
# Keep this file, even if it is empty, as a marker that this folder contains tests
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
UNICODE_ENABLE = yes
|
26
tests/unicode/unicode_basic/test_unicode_basic.cpp
Normal file
26
tests/unicode/unicode_basic/test_unicode_basic.cpp
Normal file
|
@ -0,0 +1,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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue