forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions-repl.swift
50 lines (38 loc) · 1.99 KB
/
options-repl.swift
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// RUN: not %swift -repl %s 2>&1 | %FileCheck -check-prefix=REPL_NO_FILES %s
// RUN: not %swift_driver -repl %s 2>&1 | %FileCheck -check-prefix=REPL_NO_FILES %s
// RUN: not %swift_driver -lldb-repl %s 2>&1 | %FileCheck -check-prefix=REPL_NO_FILES %s
// RUN: not %swift_driver -deprecated-integrated-repl %s 2>&1 | %FileCheck -check-prefix=REPL_NO_FILES %s
// REPL_NO_FILES: REPL mode requires no input files
// RUN: %swift_driver -deprecated-integrated-repl -### | %FileCheck -check-prefix=INTEGRATED %s
// INTEGRATED: swift -frontend -repl
// INTEGRATED: -module-name REPL
// RUN: %swift_driver -lldb-repl -### | %FileCheck -check-prefix=LLDB %s
// RUN: %swift_driver -lldb-repl -DA,B,C -DD -L /path/to/libraries -L /path/to/more/libraries -F /path/to/frameworks -lsomelib -framework SomeFramework -sdk / -I "this folder" -module-name Test -### | %FileCheck -check-prefix=LLDB-OPTS %s
// LLDB: lldb{{"?}} "--repl=
// LLDB-NOT: -module-name
// LLDB: -target {{[^ "]+}}
// LLDB-NOT: -module-name
// LLDB: "
// LLDB-OPTS: lldb{{"?}} "--repl=
// LLDB-OPTS-DAG: -target {{[^ ]+}}
// LLDB-OPTS-DAG: -D A,B,C -D D
// LLDB-OPTS-DAG: -sdk /
// LLDB-OPTS-DAG: -L /path/to/libraries
// LLDB-OPTS-DAG: -L /path/to/more/libraries
// LLDB-OPTS-DAG: -F /path/to/frameworks
// LLDB-OPTS-DAG: -lsomelib
// LLDB-OPTS-DAG: -framework SomeFramework
// LLDB-OPTS-DAG: -I \"this folder\"
// LLDB-OPTS: "
// Test LLDB detection, first in a clean environment, then in one that looks
// like the Xcode installation environment. We use hard links to make sure
// the Swift driver really thinks it's been moved.
// RUN: %swift_driver -repl -### | %FileCheck -check-prefix=INTEGRATED %s
// RUN: %swift_driver -### | %FileCheck -check-prefix=INTEGRATED %s
// RUN: rm -rf %t
// RUN: mkdir -p %t/usr/bin/
// RUN: touch %t/usr/bin/lldb
// RUN: chmod +x %t/usr/bin/lldb
// RUN: ln %swift_driver_plain %t/usr/bin/swift
// RUN: %t/usr/bin/swift -repl -### | %FileCheck -check-prefix=LLDB %s
// RUN: %t/usr/bin/swift -### | %FileCheck -check-prefix=LLDB %s