|
1 | 1 | // Check that 'swift' and 'swift repl' invoke the REPL.
|
2 |
| -// |
3 |
| -// REQUIRES: swift_interpreter |
4 |
| -// |
| 2 | + |
5 | 3 | // RUN: rm -rf %t.dir
|
6 | 4 | // RUN: mkdir -p %t.dir/usr/bin
|
7 | 5 | // RUN: %hardlink-or-copy(from: %swift_driver_plain, to: %t.dir/usr/bin/swift)
|
8 | 6 |
|
9 | 7 | // RUN: %t.dir/usr/bin/swift -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-REPL %s
|
10 | 8 | // RUN: %t.dir/usr/bin/swift repl -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-REPL %s
|
11 |
| -// |
| 9 | + |
12 | 10 | // CHECK-SWIFT-INVOKES-REPL: {{.*}}/swift -frontend -repl
|
13 | 11 |
|
14 | 12 |
|
15 |
| -// Check that 'swift -', 'swift t.swift', and 'swift /path/to/file' invoke the interpreter |
16 |
| -// (for shebang line use). We have to run these since we can't get the driver to |
17 |
| -// dump what it is doing and test the argv[1] processing. |
18 |
| -// |
19 | 13 | // RUN: %empty-directory(%t.dir)
|
20 | 14 | // RUN: %empty-directory(%t.dir/subpath)
|
21 | 15 | // RUN: echo "print(\"exec: \" + #file)" > %t.dir/stdin
|
22 | 16 | // RUN: echo "print(\"exec: \" + #file)" > %t.dir/t.swift
|
23 | 17 | // RUN: echo "print(\"exec: \" + #file)" > %t.dir/subpath/build
|
24 |
| -// RUN: cd %t.dir && %swift_driver_plain - < %t.dir/stdin -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-STDIN-INVOKES-INTERPRETER %s |
25 |
| -// CHECK-SWIFT-STDIN-INVOKES-INTERPRETER: exec: <stdin> |
26 |
| -// RUN: cd %t.dir && %swift_driver_plain t.swift -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-SUFFIX-INVOKES-INTERPRETER %s |
27 |
| -// CHECK-SWIFT-SUFFIX-INVOKES-INTERPRETER: exec: t.swift |
28 |
| -// RUN: cd %t.dir && %swift_driver_plain subpath/build -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-PATH-INVOKES-INTERPRETER %s |
29 |
| -// CHECK-SWIFT-PATH-INVOKES-INTERPRETER: exec: subpath/build |
| 18 | +// RUN: cd %t.dir && %swift_driver_plain -### - < %t.dir/stdin 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-INTERPRETER %s |
| 19 | +// RUN: cd %t.dir && %swift_driver_plain -### t.swift 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-INTERPRETER %s |
| 20 | +// RUN: cd %t.dir && %swift_driver_plain -### subpath/build 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-INTERPRETER %s |
| 21 | + |
| 22 | +// CHECK-SWIFT-INVOKES-INTERPRETER: {{.*}}/swift -frontend -interpret |
30 | 23 |
|
31 | 24 |
|
32 | 25 | // Check that 'swift foo' invokes 'swift-foo'.
|
|
0 commit comments