added test for swift hook

This commit is contained in:
Ben Asher
2017-01-13 13:33:44 -08:00
parent 14cebbb25f
commit ca731268a4
5 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
.DS_Store
/.build
/Packages
/*.xcodeproj

View File

@@ -0,0 +1,5 @@
import PackageDescription
let package = Package(
name: "swift_hooks_repo"
)

View File

@@ -0,0 +1 @@
print("Hello, world!")

View File

@@ -0,0 +1,6 @@
- id: swift-hooks-repo
name: Swift hooks repo example
description: Runs the hello world app generated by swift package init --type executable (binary called swift_hooks_repo here)
entry: swift_hooks_repo
language: swift
files: \.(swift)$

View File

@@ -214,6 +214,14 @@ def test_system_hook_with_spaces(tempdir_factory, store):
)
@pytest.mark.integration
def test_swift_hook(tempdir_factory, store):
_test_hook_repo(
tempdir_factory, store, 'swift_hooks_repo',
'swift-hooks-repo', [], b'Hello, world!\n',
)
@pytest.mark.integration
def test_missing_executable(tempdir_factory, store):
_test_hook_repo(