mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Add tests for legacy path behavior
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
include:
|
||||
path: legacy_paths_test/legacy_included_paths_test.yml
|
||||
useRelativePaths: false
|
||||
name: NewName
|
||||
@@ -0,0 +1,33 @@
|
||||
configFiles:
|
||||
IncludedConfig: config
|
||||
options:
|
||||
carthageBuildPath: carthage_build
|
||||
carthageExecutablePath: carthage_executable
|
||||
targets:
|
||||
IncludedTarget:
|
||||
type: application
|
||||
platform: tvOS
|
||||
configFiles:
|
||||
Config: config
|
||||
sources:
|
||||
- source
|
||||
dependencies:
|
||||
- framework: Framework
|
||||
info:
|
||||
path: info
|
||||
entitlements:
|
||||
path: entitlements
|
||||
preBuildScripts:
|
||||
- path: preBuildScript
|
||||
postCompileScripts:
|
||||
- path: postCompileScript
|
||||
postBuildScripts:
|
||||
- path: postBuildScript
|
||||
aggregateTargets:
|
||||
IncludedAggregateTarget:
|
||||
targets:
|
||||
- IncludedTarget
|
||||
configFiles:
|
||||
Config: config
|
||||
buildScripts:
|
||||
- path: buildScript
|
||||
@@ -105,6 +105,45 @@ class SpecLoadingTests: XCTestCase {
|
||||
]
|
||||
}
|
||||
|
||||
$0.it("respects directory expansion preference") {
|
||||
let path = fixturePath + "legacy_paths_test.yml"
|
||||
let project = try Project(path: path)
|
||||
|
||||
try expect(project.configFiles) == [
|
||||
"IncludedConfig": "config",
|
||||
]
|
||||
|
||||
try expect(project.options) == SpecOptions(
|
||||
carthageBuildPath: "carthage_build",
|
||||
carthageExecutablePath: "carthage_executable"
|
||||
)
|
||||
|
||||
try expect(project.aggregateTargets) == [
|
||||
AggregateTarget(
|
||||
name: "IncludedAggregateTarget",
|
||||
targets: ["IncludedTarget"],
|
||||
configFiles: ["Config": "config"],
|
||||
buildScripts: [BuildScript(script: .path("buildScript"))]
|
||||
),
|
||||
]
|
||||
|
||||
try expect(project.targets) == [
|
||||
Target(
|
||||
name: "IncludedTarget",
|
||||
type: .application,
|
||||
platform: .tvOS,
|
||||
configFiles: ["Config": "config"],
|
||||
sources: ["source"],
|
||||
dependencies: [Dependency(type: .framework, reference: "Framework")],
|
||||
info: Plist(path: "info"),
|
||||
entitlements: Plist(path: "entitlements"),
|
||||
preBuildScripts: [BuildScript(script: .path("preBuildScript"))],
|
||||
postCompileScripts: [BuildScript(script: .path("postCompileScript"))],
|
||||
postBuildScripts: [BuildScript(script: .path("postBuildScript"))]
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
$0.it("parses yaml types") {
|
||||
let path = fixturePath + "yaml.yml"
|
||||
let dictionary = try loadYamlDictionary(path: path)
|
||||
|
||||
Reference in New Issue
Block a user