Skip to content

Commit 3156cf3

Browse files
authored
make swiftpm integration tests less brittle (swiftlang#96)
1 parent fdc8ba6 commit 3156cf3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

swift-package-init-exec.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
RUN: rm -rf %t.dir
77
RUN: mkdir -p %t.dir/Project
88
RUN: %{swift-package} --package-path %t.dir/Project init --type executable
9+
RUN: rm -rf %t.dir/Project/Sources/Project/*
10+
RUN: echo "print(\"Hello, World!\")" >%t.dir/Project/Sources/Project/main.swift
911
RUN: %{swift-build} --package-path %t.dir/Project 2>&1 | tee %t.build-log
1012
```
1113

@@ -29,7 +31,7 @@ RUN: %{FileCheck} --check-prefix CHECK-TOOL-OUTPUT --input-file %t.out %s
2931
```
3032

3133
```
32-
CHECK-TOOL-OUTPUT: Hello, world!
34+
CHECK-TOOL-OUTPUT: Hello, World!
3335
```
3436

3537
## Check there were no compile errors or warnings.

swift-run.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
RUN: rm -rf %t.dir
77
RUN: mkdir -p %t.dir/secho
88
RUN: %{swift-package} --package-path %t.dir/secho init --type executable
9+
RUN: rm -rf %t.dir/secho/Sources/secho/*
910
RUN: echo "import Foundation; print(CommandLine.arguments.dropFirst().joined(separator: \" \"))" >%t.dir/secho/Sources/secho/main.swift
1011
RUN: %{swift-run} --package-path %t.dir/secho secho 1 "two" 2>&1 | tee %t.run-log
1112
```

0 commit comments

Comments
 (0)