import AppKit import Foundation import Testing @testable import Voxley @Test func wordListMergesDelimitedPhrasesWithManualVocabulary() throws { var preferences = Preferences() preferences.vocabulary = "Voxley\n" let added = try preferences.importVocabulary("\u{FEFF}voxley, Protomota Lab\r\nInkspring; \"Acme, Inc.\"\tinkSpring") #expect(added == 3) #expect(preferences.contextWords == ["Voxley", "Protomota Lab", "Inkspring", "Acme, Inc."]) } @Test func wordListDoesNotChangeVocabularyWhenImportFails() throws { var preferences = Preferences() preferences.vocabulary = (1..