From 1b49788a0af488e287b8fa92e9ec20db0dce11b8 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 3 May 2019 17:29:54 -0500 Subject: [PATCH] Make test cases run again. --- NetNewsWire.xcodeproj/project.pbxproj | 3 +-- .../ScriptingTests/AppleScriptXCTestCase.swift | 2 +- .../NSAppleEventDescriptor+UserRecordFields.swift | 2 +- xcconfig/NetNewsWireTests_target.xcconfig | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 526dc1fd1..5ee0a1f9a 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -2998,7 +2998,6 @@ baseConfigurationReference = D5907CDD2002F0BE005947E5 /* NetNewsWire_project_debug.xcconfig */; buildSettings = { IPHONEOS_DEPLOYMENT_TARGET = 12.2; - MACOSX_DEPLOYMENT_TARGET = 10.14; }; name = Debug; }; @@ -3007,7 +3006,6 @@ baseConfigurationReference = D5907CDC2002F0BE005947E5 /* NetNewsWire_project_release.xcconfig */; buildSettings = { IPHONEOS_DEPLOYMENT_TARGET = 12.2; - MACOSX_DEPLOYMENT_TARGET = 10.14; }; name = Release; }; @@ -3045,6 +3043,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = D5907CDF2002F0F9005947E5 /* NetNewsWireTests_target.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = "-"; PRODUCT_NAME = NetNewsWireTests; }; name = Debug; diff --git a/Tests/NetNewsWireTests/ScriptingTests/AppleScriptXCTestCase.swift b/Tests/NetNewsWireTests/ScriptingTests/AppleScriptXCTestCase.swift index 24f0ff330..5a8db6816 100644 --- a/Tests/NetNewsWireTests/ScriptingTests/AppleScriptXCTestCase.swift +++ b/Tests/NetNewsWireTests/ScriptingTests/AppleScriptXCTestCase.swift @@ -31,7 +31,7 @@ class AppleScriptXCTestCase: XCTestCase { func doIndividualScript(filename:String) -> NSAppleEventDescriptor? { var errorDict: NSDictionary? = nil let testBundle = Bundle(for: type(of: self)) - let url = testBundle.url(forResource:filename, withExtension:"applescript", subdirectory:"TestScripts") + let url = testBundle.url(forResource:filename, withExtension:"scpt") guard let testScriptUrl = url else { XCTFail("Failed Getting script URL") return nil diff --git a/Tests/NetNewsWireTests/ScriptingTests/NSAppleEventDescriptor+UserRecordFields.swift b/Tests/NetNewsWireTests/ScriptingTests/NSAppleEventDescriptor+UserRecordFields.swift index e1e273478..f65467310 100644 --- a/Tests/NetNewsWireTests/ScriptingTests/NSAppleEventDescriptor+UserRecordFields.swift +++ b/Tests/NetNewsWireTests/ScriptingTests/NSAppleEventDescriptor+UserRecordFields.swift @@ -22,7 +22,7 @@ extension NSAppleEventDescriptor { print ("error: usrfDictionary() expected input to be a record") return [:] } - guard let usrfList = self.forKeyword("usrf".FourCharCode()) else { + guard let usrfList = self.forKeyword("usrf".fourCharCode()) else { print ("error: usrfDictionary() couldn't find usrf") return [:] } diff --git a/xcconfig/NetNewsWireTests_target.xcconfig b/xcconfig/NetNewsWireTests_target.xcconfig index 39aefa57a..43abde52e 100644 --- a/xcconfig/NetNewsWireTests_target.xcconfig +++ b/xcconfig/NetNewsWireTests_target.xcconfig @@ -10,7 +10,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES COMBINE_HIDPI_IMAGES = YES BUNDLE_LOADER = $(TEST_HOST) LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks -INFOPLIST_FILE = NetNewsWireTests/Info.plist +INFOPLIST_FILE = Tests/NetNewsWireTests/Info.plist PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.NetNewsWireTests PRODUCT_NAME = $(TARGET_NAME) TEST_HOST = $(BUILT_PRODUCTS_DIR)/NetNewsWire.app/Contents/MacOS/NetNewsWire