mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-27 19:17:06 +08:00
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:
@@ -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" )
|
||||
|
||||
Reference in New Issue
Block a user