-
Notifications
You must be signed in to change notification settings - Fork 83
/
swift-package-with-spaces.txt
33 lines (31 loc) · 1.15 KB
/
swift-package-with-spaces.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// swift-tools-version:4.2
// 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} --package-path %t.dir/more\ spaces/special\ tool -v 2>&1 | tee %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 {{.*}} '@{{.*}}/.build/{{[^/]+}}/debug/special_tool.build/sources'
//
// 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",
targets: [
.target(name: "special tool", path: "./"),
]
)