Merge pull request #23 from hartbit/swift-run

Add a test for the new swift run command
diff --git a/swift-run.md b/swift-run.md
new file mode 100644
index 0000000..4d14fed
--- /dev/null
+++ b/swift-run.md
@@ -0,0 +1,23 @@
+# Test `swift run` (executable)
+
+## Create a new package with an echo executable.
+
+```
+RUN: rm -rf %t.dir
+RUN: mkdir -p %t.dir/secho
+RUN: %{swift} package --package-path %t.dir/secho init --type executable
+RUN: echo "import Foundation; print(CommandLine.arguments.dropFirst().joined(separator: \" \"))" >%t.dir/secho/Sources/secho/main.swift
+RUN: %{swift} run --package-path %t.dir/secho secho 1 "two" 2>&1 | tee %t.run-log
+```
+
+## Check the run log.
+
+```
+RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.run-log %s
+```
+
+```
+CHECK-BUILD-LOG: Compile Swift Module 'secho'
+CHECK-BUILD-LOG: Linking {{.*}}secho
+CHECK-BUILD-LOG: 1 two
+```
\ No newline at end of file