From 8ac4267ce3dc2ced667428da9c8914972b21bafc Mon Sep 17 00:00:00 2001 From: "Dr Mark C. Sinclair" Date: Tue, 29 Oct 2024 14:13:36 +0000 Subject: [PATCH] chore(developer): added commented-out unit test for multiple grouped virtual keys (see #12307) --- .../src/kmcmplib/tests/gtest-compiler-test.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/developer/src/kmcmplib/tests/gtest-compiler-test.cpp b/developer/src/kmcmplib/tests/gtest-compiler-test.cpp index 9f34faa156a..e6a5a0f513f 100644 --- a/developer/src/kmcmplib/tests/gtest-compiler-test.cpp +++ b/developer/src/kmcmplib/tests/gtest-compiler-test.cpp @@ -1807,17 +1807,17 @@ TEST_F(CompilerTest, GetXStringImpl_type_osb_test) { u16cpy(str, u"[CTRL ALT]"); EXPECT_EQ(KmnCompilerMessages::ERROR_InvalidToken, GetXStringImpl(tstr, &fileKeyboard, str, u"", output, 80, 0, &newp, FALSE)); - // virtual key, in VKeyNames, no space between modifier and key portion, ERROR_InvalidToken + // virtual key, in VKeyNames, no space between modifier and key portion, ERROR_InvalidToken (see #12307) // fileKeyboard.version = VERSION_90; // u16cpy(str, u"[CTRLK_A]"); // EXPECT_EQ(KmnCompilerMessages::ERROR_InvalidToken, GetXStringImpl(tstr, &fileKeyboard, str, u"", output, 80, 0, &newp, FALSE)); - // virtual key, in VKeyNames, no space between modifiers, ERROR_InvalidToken + // virtual key, in VKeyNames, no space between modifiers, ERROR_InvalidToken (see #12307) // fileKeyboard.version = VERSION_90; // u16cpy(str, u"[CTRLALT K_A]"); // EXPECT_EQ(KmnCompilerMessages::ERROR_InvalidToken, GetXStringImpl(tstr, &fileKeyboard, str, u"", output, 80, 0, &newp, FALSE)); - // virtual key, '_' between modifier and key portion', ERROR_InvalidToken + // virtual key, '_' between modifier and key portion', ERROR_InvalidToken (see #12307) // fileKeyboard.version = VERSION_90; // u16cpy(str, u"[CTRL_K_A]"); // EXPECT_EQ(STATUS_Success, GetXStringImpl(tstr, &fileKeyboard, str, u"", output, 80, 0, &newp, FALSE)); @@ -2028,6 +2028,14 @@ TEST_F(CompilerTest, GetXStringImpl_type_osb_test) { EXPECT_EQ(1, msgproc_errors.size()); EXPECT_EQ(KmnCompilerMessages::WARN_VirtualKeyWithMnemonicLayout, msgproc_errors[0].errorCode); msgproc_errors.clear(); + + // virtual key, in VKeyNames, multiple keys, valid (see #12307) + // fileKeyboard.version = VERSION_90; + // u16cpy(str, u"[K_A K_B K_C]"); + // EXPECT_EQ(STATUS_Success, GetXStringImpl(tstr, &fileKeyboard, str, u"", output, 80, 0, &newp, FALSE)); + // sFlag = ISVIRTUALKEY; + // KMX_WCHAR tstr_virtual_key_multi_valid[] = { UC_SENTINEL, CODE_EXTENDED, sFlag, 65, 66, 67, UC_SENTINEL_EXTENDEDEND, 0 }; + // EXPECT_EQ(0, u16cmp(tstr_virtual_key_multi_valid, tstr)); } // KMX_DWORD process_baselayout(PFILE_KEYBOARD fk, PKMX_WCHAR q, PKMX_WCHAR tstr, int *mx)