Merge pull request #10 from aciidb0mb3r/swift-package-init-changes

Remove empty Package.swift for swiftpm tests.
diff --git a/swift-build.py b/swift-build.py
deleted file mode 100644
index bfc2c46..0000000
--- a/swift-build.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# Trivial test for Swift build.
-#
-# Make a sandbox dir.
-# RUN: rm -rf %t.dir
-# RUN: mkdir -p %t.dir/tool
-# RUN: touch %t.dir/tool/Package.swift
-# RUN: echo 'print("HI")' > %t.dir/tool/main.swift
-# RUN: %{swift} build --chdir %t.dir/tool -v > %t.build-log
-
-# Check the build log.
-#
-# RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s
-#
-# CHECK-BUILD-LOG: swiftc{{.*}} -module-name tool
-
-# Verify that the tool exists and works.
-#
-# RUN: test -x %t.dir/tool/.build/debug/tool
-# RUN: %t.dir/tool/.build/debug/tool > %t.out
-# RUN: %{FileCheck} --check-prefix CHECK-TOOL-OUTPUT --input-file %t.out %s
-#
-# CHECK-TOOL-OUTPUT: HI
diff --git a/swift-build.txt b/swift-build.txt
new file mode 100644
index 0000000..4d58927
--- /dev/null
+++ b/swift-build.txt
@@ -0,0 +1,28 @@
+// Trivial test for Swift build.
+//
+// Make a sandbox dir.
+// RUN: rm -rf %t.dir
+// RUN: mkdir -p %t.dir/tool
+// RUN: cp %s %t.dir/tool/Package.swift
+// RUN: echo 'print("HI")' > %t.dir/tool/main.swift
+// RUN: %{swift} build --chdir %t.dir/tool -v > %t.build-log
+//
+// Check the build log.
+//
+// RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s
+//
+// CHECK-BUILD-LOG: swiftc{{.*}} -module-name tool
+//
+// Verify that the tool exists and works.
+//
+// RUN: test -x %t.dir/tool/.build/debug/tool
+// RUN: %t.dir/tool/.build/debug/tool > %t.out
+// RUN: %{FileCheck} --check-prefix CHECK-TOOL-OUTPUT --input-file %t.out %s
+//
+// CHECK-TOOL-OUTPUT: HI
+
+import PackageDescription
+
+let package = Package(
+   name: "tool"
+)
diff --git a/swift-package-with-spaces.py b/swift-package-with-spaces.py
deleted file mode 100644
index 210f814..0000000
--- a/swift-package-with-spaces.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# Check a package with spaces.
-#
-# Make a sandbox dir.
-# RUN: rm -rf %t.dir
-# RUN: mkdir -p %t.dir/more\ spaces/special\ tool
-# RUN: touch %t.dir/more\ spaces/special\ tool/Package.swift
-# RUN: echo 'foo()' > %t.dir/more\ spaces/special\ tool/main.swift
-# RUN: echo 'func foo() { print("HI") }' > %t.dir/more\ spaces/special\ tool/some\ file.swift
-# RUN: %{swift} build --chdir %t.dir/more\ spaces/special\ tool -v > %t.build-log
-
-# Check the build log.
-#
-# RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s
-#
-# CHECK-BUILD-LOG: swiftc{{.*}} -module-name special_tool {{.*}} "{{.*}}/more spaces/special tool/some file.swift"
-
-# Verify that the tool exists and works.
-#
-# RUN: test -x %t.dir/more\ spaces/special\ tool/.build/debug/special\ tool
-# RUN: %t.dir/more\ spaces/special\ tool/.build/debug/special\ tool > %t.out
-# RUN: %{FileCheck} --check-prefix CHECK-TOOL-OUTPUT --input-file %t.out %s
-#
-# CHECK-TOOL-OUTPUT: HI
diff --git a/swift-package-with-spaces.txt b/swift-package-with-spaces.txt
new file mode 100644
index 0000000..e44c9c3
--- /dev/null
+++ b/swift-package-with-spaces.txt
@@ -0,0 +1,29 @@
+// Check a package with spaces.
+//
+// Make a sandbox dir.
+// RUN: rm -rf %t.dir
+// RUN: mkdir -p %t.dir/more\ spaces/special\ tool
+// RUN: cp %s %t.dir/more\ spaces/special\ tool/Package.swift
+// RUN: echo 'foo()' > %t.dir/more\ spaces/special\ tool/main.swift
+// RUN: echo 'func foo() { print("HI") }' > %t.dir/more\ spaces/special\ tool/some\ file.swift
+// RUN: %{swift} build --chdir %t.dir/more\ spaces/special\ tool -v > %t.build-log
+//
+// Check the build log.
+//
+// RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s
+//
+// CHECK-BUILD-LOG: swiftc{{.*}} -module-name special_tool {{.*}} "{{.*}}/more spaces/special tool/some file.swift"
+//
+// Verify that the tool exists and works.
+//
+// RUN: test -x %t.dir/more\ spaces/special\ tool/.build/debug/special\ tool
+// RUN: %t.dir/more\ spaces/special\ tool/.build/debug/special\ tool > %t.out
+// RUN: %{FileCheck} --check-prefix CHECK-TOOL-OUTPUT --input-file %t.out %s
+//
+// CHECK-TOOL-OUTPUT: HI
+
+import PackageDescription
+
+let package = Package(
+   name: "special tool"
+)
diff --git a/test-c-library-swiftpm/z/Package.swift b/test-c-library-swiftpm/z/Package.swift
index e69de29..87402a4 100644
--- a/test-c-library-swiftpm/z/Package.swift
+++ b/test-c-library-swiftpm/z/Package.swift
@@ -0,0 +1,5 @@
+import PackageDescription
+
+let package = Package(
+   name: "Zlib"
+)
diff --git a/test-foundation-package/test-foundation-package.py b/test-foundation-package/test-foundation-package.py
deleted file mode 100644
index 3e2450e..0000000
--- a/test-foundation-package/test-foundation-package.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# Trivial test for importing Foundation
-#
-# 
-# Make a sandbox dir.
-# RUN: rm -rf %t.dir
-# RUN: mkdir -p %t.dir/tool
-# RUN: touch %t.dir/tool/Package.swift
-# RUN: cp %S/main.swift %t.dir/tool/main.swift
-# RUN: %{swift} build --chdir %t.dir/tool -v > %t.build-log
-
-# Check the build log.
-#
-# RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s
-#
-# CHECK-BUILD-LOG: swiftc{{.*}} -module-name tool
-
-# Verify that the tool exists and works.
-#
-# RUN: test -x %t.dir/tool/.build/debug/tool
-# RUN: %t.dir/tool/.build/debug/tool > %t.out
-# RUN: %{FileCheck} --check-prefix CHECK-TOOL-OUTPUT --input-file %t.out %s
-#
-# CHECK-TOOL-OUTPUT: Printing URL
-# CHECK-TOOL-OUTPUT-NEXT: /tmp
-# CHECK-TOOL-OUTPUT-NEXT: Done printing URL
diff --git a/test-foundation-package/test-foundation-package.txt b/test-foundation-package/test-foundation-package.txt
new file mode 100644
index 0000000..f1f606a
--- /dev/null
+++ b/test-foundation-package/test-foundation-package.txt
@@ -0,0 +1,31 @@
+// Trivial test for importing Foundation
+//
+//
+// Make a sandbox dir.
+// RUN: rm -rf %t.dir
+// RUN: mkdir -p %t.dir/tool
+// RUN: cp %s %t.dir/tool/Package.swift
+// RUN: cp %S/main.swift %t.dir/tool/main.swift
+// RUN: %{swift} build --chdir %t.dir/tool -v > %t.build-log
+//
+// Check the build log.
+//
+// RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s
+//
+// CHECK-BUILD-LOG: swiftc{{.*}} -module-name tool
+//
+// Verify that the tool exists and works.
+//
+// RUN: test -x %t.dir/tool/.build/debug/tool
+// RUN: %t.dir/tool/.build/debug/tool > %t.out
+// RUN: %{FileCheck} --check-prefix CHECK-TOOL-OUTPUT --input-file %t.out %s
+//
+// CHECK-TOOL-OUTPUT: Printing URL
+// CHECK-TOOL-OUTPUT-NEXT: /tmp
+// CHECK-TOOL-OUTPUT-NEXT: Done printing URL
+
+import PackageDescription
+
+let package = Package(
+   name: "tool"
+)
diff --git a/test-xctest-package/test-xctest-package.py b/test-xctest-package/test-xctest-package.py
deleted file mode 100644
index 3c0bd9a..0000000
--- a/test-xctest-package/test-xctest-package.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# Trivial test for importing XCTest.
-#
-
-# This test doesn't work on Darwin yet, because the XCTest overlay isn't shipped
-# with the package, and can't be found:#
-#   <rdar://problem/23600043> Cannot import XCTest with swift from a downloadable package
-# REQUIRES: platform=Linux
-#
-# Make a sandbox dir.
-# RUN: rm -rf %t.dir
-# RUN: mkdir -p %t.dir/tool
-# RUN: touch %t.dir/tool/Package.swift
-# RUN: cp %S/main.swift %t.dir/tool/main.swift
-# RUN: %{swift} build --chdir %t.dir/tool -v > %t.build-log
-
-# Check the build log.
-#
-# RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s
-#
-# CHECK-BUILD-LOG: swiftc{{.*}} -module-name tool
-
-# Verify that the tool exists and works.
-#
-# RUN: test -x %t.dir/tool/.build/debug/tool
-# RUN: %t.dir/tool/.build/debug/tool > %t.out
-# RUN: %{FileCheck} --check-prefix CHECK-TOOL-OUTPUT --input-file %t.out %s
-#
-# CHECK-TOOL-OUTPUT: HI
diff --git a/test-xctest-package/test-xctest-package.txt b/test-xctest-package/test-xctest-package.txt
new file mode 100644
index 0000000..8a3f83e
--- /dev/null
+++ b/test-xctest-package/test-xctest-package.txt
@@ -0,0 +1,34 @@
+// Trivial test for importing XCTest.
+//
+//
+// This test doesn't work on Darwin yet, because the XCTest overlay isn't shipped
+// with the package, and can't be found:#
+//   <rdar://problem/23600043> Cannot import XCTest with swift from a downloadable package
+// REQUIRES: platform=Linux
+//
+// Make a sandbox dir.
+// RUN: rm -rf %t.dir
+// RUN: mkdir -p %t.dir/tool
+// RUN: cp %s %t.dir/tool/Package.swift
+// RUN: cp %S/main.swift %t.dir/tool/main.swift
+// RUN: %{swift} build --chdir %t.dir/tool -v > %t.build-log
+//
+// Check the build log.
+//
+// RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s
+//
+// CHECK-BUILD-LOG: swiftc{{.*}} -module-name tool
+//
+// Verify that the tool exists and works.
+//
+// RUN: test -x %t.dir/tool/.build/debug/tool
+// RUN: %t.dir/tool/.build/debug/tool > %t.out
+// RUN: %{FileCheck} --check-prefix CHECK-TOOL-OUTPUT --input-file %t.out %s
+//
+// CHECK-TOOL-OUTPUT: HI
+
+import PackageDescription
+
+let package = Package(
+   name: "tool"
+)