native macOS codings agent orchestrator prowl.onev.cat
Something went wrong. Try again.
Swift
12345678910111213141516171819import Foundationimport Testing
@testable import Prowl
@MainActorstruct TerminalConfigSettingsSectionTests { @Test func displayPathAbbreviatesTheHomeFolder() { let home = FileManager.default.homeDirectoryForCurrentUser.path(percentEncoded: false) let prefix = home.hasSuffix("/") ? home : home + "/" #expect( TerminalConfigSettingsSection.displayPath(prefix + ".config/prowl/ghostty.conf") == "~/.config/prowl/ghostty.conf" ) #expect(TerminalConfigSettingsSection.displayPath("/etc/ghostty.conf") == "/etc/ghostty.conf") let sibling = String(prefix.dropLast()) + "-other/ghostty.conf" #expect(TerminalConfigSettingsSection.displayPath(sibling) == sibling) }}