Add a test checking "+" and "Num +" accelerator parsing

Confirm that this works correctly and also that "+" is intentionally '+'
and not WXK_ADD.
This commit is contained in:
Vadim Zeitlin
2022-06-08 15:40:23 +01:00
parent b90734d274
commit 856758269f
+8
View File
@@ -89,6 +89,14 @@ TEST_CASE( "wxAcceleratorEntry::StringTests", "[accelentry]" )
{
CHECK( a.FromString("Alt+Shift+F1") );
CheckAccelEntry(a, WXK_F1, wxACCEL_ALT | wxACCEL_SHIFT);
// Note that this is just "+" and not WXK_ADD.
CHECK( a.FromString("Ctrl-+") );
CheckAccelEntry(a, '+', wxACCEL_CTRL);
// But this is WXK_NUMPAD_ADD, to distinguish it from the main "+" key.
CHECK( a.FromString("Ctrl-Num +") );
CheckAccelEntry(a, WXK_NUMPAD_ADD, wxACCEL_CTRL);
}
SECTION( "Create from invalid string" )