We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents db6f71e + 549de4f commit 1d5d149Copy full SHA for 1d5d149
swift-run.md
@@ -0,0 +1,23 @@
1
+# Test `swift run` (executable)
2
+
3
+## Create a new package with an echo executable.
4
5
+```
6
+RUN: rm -rf %t.dir
7
+RUN: mkdir -p %t.dir/secho
8
+RUN: %{swift} package --package-path %t.dir/secho init --type executable
9
+RUN: echo "import Foundation; print(CommandLine.arguments.dropFirst().joined(separator: \" \"))" >%t.dir/secho/Sources/secho/main.swift
10
+RUN: %{swift} run --package-path %t.dir/secho secho 1 "two" 2>&1 | tee %t.run-log
11
12
13
+## Check the run log.
14
15
16
+RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.run-log %s
17
18
19
20
+CHECK-BUILD-LOG: Compile Swift Module 'secho'
21
+CHECK-BUILD-LOG: Linking {{.*}}secho
22
+CHECK-BUILD-LOG: 1 two
23
0 commit comments