logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

test_unicode_basic.cpp (542B)


  1. // Copyright 2023 QMK
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "keyboard_report_util.hpp"
  4. #include "keycode.h"
  5. #include "test_common.hpp"
  6. #include "test_keymap_key.hpp"
  7. using testing::_;
  8. class UnicodeBasic : public TestFixture {};
  9. TEST_F(UnicodeBasic, sends_unicode_sequence) {
  10. TestDriver driver;
  11. set_unicode_input_mode(UNICODE_MODE_LINUX);
  12. auto key_uc = KeymapKey(0, 0, 0, UC(0x03A8)); // Ψ
  13. set_keymap({key_uc});
  14. EXPECT_UNICODE(driver, 0x03A8);
  15. tap_key(key_uc);
  16. VERIFY_AND_CLEAR(driver);
  17. }