Skip to content

Commit

Permalink
Test tvOS output
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe Elsass committed Apr 10, 2018
1 parent 08c93bf commit ee3fe8a
Showing 1 changed file with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,28 @@ class XcodeBuildPluginExtensionSpecification extends Specification {

}

def "application bundle for tvOS"() {
when:
File projectDir = new File("../example/tvOS/Example_tvOS_Swift")
project = ProjectBuilder.builder().withProjectDir(projectDir).build()
extension = new XcodeBuildPluginExtension(project)
extension.commandRunner = new CommandRunner()
XcodeProjectFile xcodeProjectFile = new XcodeProjectFile(project, new File(projectDir, "Example_tvOS_Swift.xcodeproj/project.pbxproj"))
extension.projectSettings = xcodeProjectFile.getProjectSettings()

extension.type = Type.tvOS
extension.simulator = false
extension.target = "Example_tvOS_Swift"
extension.productName = "Example_tvOS_Swift"
extension.infoPlist = "../../example/tvOS/Example_tvOS_Swift/Example_tvOS_Swift/Info.plist"

String applicationBundle = extension.getApplicationBundle().absolutePath;

then:
applicationBundle.endsWith("build/sym/Debug-appletvos/Example_tvOS_Swift.app")

}

def "application bundle for watchos"() {
when:

Expand Down Expand Up @@ -410,6 +432,24 @@ class XcodeBuildPluginExtensionSpecification extends Specification {
}


def "get binary tvOS"() {
when:
File projectDir = new File("../example/tvOS/Example_tvOS_Swift")
project = ProjectBuilder.builder().withProjectDir(projectDir).build()
extension = new XcodeBuildPluginExtension(project)
XcodeProjectFile xcodeProjectFile = new XcodeProjectFile(project, new File(projectDir, "Example_tvOS_Swift.xcodeproj/project.pbxproj"))
extension.projectSettings = xcodeProjectFile.getProjectSettings()
extension.type = Type.tvOS
extension.simulator = false
extension.target = "Example_tvOS_Swift"
extension.productType = "appex"
extension.infoPlist = "../../example/tvOS/Example_tvOS_Swift/Example_tvOS_Swift/Info.plist"

then:
extension.getBinary().toString().endsWith("Debug-appletvos/Example_tvOS_Swift.app/Example_tvOS_Swift")
}


def "get binary OS X"() {
when:
File projectDir = new File("../example/OSX/ExampleOSX")
Expand Down

0 comments on commit ee3fe8a

Please sign in to comment.