diff --git a/pkg/config/user_config_validation_test.go b/pkg/config/user_config_validation_test.go index 813cfc7c8..d32b29c6f 100644 --- a/pkg/config/user_config_validation_test.go +++ b/pkg/config/user_config_validation_test.go @@ -74,6 +74,30 @@ func TestUserConfigValidate_enums(t *testing.T) { {value: "invalid_value", valid: false}, }, }, + { + name: "Custom command keybinding in sub menu", + setup: func(config *UserConfig, value string) { + config.CustomCommands = []CustomCommand{ + { + Key: "X", + Description: "My Custom Commands", + CommandMenu: []CustomCommand{ + {Key: value, Command: "echo 'hello'", Context: "global"}, + }, + }, + } + }, + testCases: []testCase{ + {value: "", valid: true}, + {value: "", valid: true}, + {value: "q", valid: true}, + {value: "", valid: true}, + /* EXPECTED: + {value: "invalid_value", valid: false}, + ACTUAL */ + {value: "invalid_value", valid: true}, + }, + }, { name: "Custom command sub menu", setup: func(config *UserConfig, _ string) {