Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca73126

Browse files
committed
added test for swift hook
1 parent 14cebbb commit ca73126

5 files changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import PackageDescription
2+
3+
let package = Package(
4+
name: "swift_hooks_repo"
5+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("Hello, world!")
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- id: swift-hooks-repo
2+
name: Swift hooks repo example
3+
description: Runs the hello world app generated by swift package init --type executable (binary called swift_hooks_repo here)
4+
entry: swift_hooks_repo
5+
language: swift
6+
files: \.(swift)$

tests/repository_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,14 @@ def test_system_hook_with_spaces(tempdir_factory, store):
214214
)
215215

216216

217+
@pytest.mark.integration
218+
def test_swift_hook(tempdir_factory, store):
219+
_test_hook_repo(
220+
tempdir_factory, store, 'swift_hooks_repo',
221+
'swift-hooks-repo', [], b'Hello, world!\n',
222+
)
223+
224+
217225
@pytest.mark.integration
218226
def test_missing_executable(tempdir_factory, store):
219227
_test_hook_repo(

0 commit comments

Comments
 (0)