Skip to main content
Glama
MenuCommandTests.swift1.18 kB
// // MenuCommandTests.swift // PeekabooCLI // import Testing @testable import PeekabooCLI @Suite("Menu command input normalization") struct MenuCommandSelectionNormalizationTests { @Test("Treat --item containing '>' as --path") func itemWithPathDelimiterBecomesPath() { let input = "View > Show View Options" let normalized = normalizeMenuSelection(item: input, path: nil) #expect(normalized.item == nil) #expect(normalized.path == input) #expect(normalized.convertedFromItem) } @Test("Preserve explicit path when provided") func explicitPathRemains() { let normalized = normalizeMenuSelection(item: "File", path: "Apple > About This Mac") #expect(normalized.item == "File") #expect(normalized.path == "Apple > About This Mac") #expect(normalized.convertedFromItem == false) } @Test("Plain item stays untouched") func simpleItemStaysItem() { let normalized = normalizeMenuSelection(item: "New Window", path: nil) #expect(normalized.item == "New Window") #expect(normalized.path == nil) #expect(normalized.convertedFromItem == false) } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/steipete/Peekaboo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server