Skip to content

Commit 94a53ee

Browse files
authored
Merge pull request #21216 from jrose-apple/pounding-on-the-keyboard
2 parents cf7eaeb + a090761 commit 94a53ee

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

test/Driver/subcommands.swift

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,25 @@
11
// Check that 'swift' and 'swift repl' invoke the REPL.
2-
//
3-
// REQUIRES: swift_interpreter
4-
//
2+
53
// RUN: rm -rf %t.dir
64
// RUN: mkdir -p %t.dir/usr/bin
75
// RUN: %hardlink-or-copy(from: %swift_driver_plain, to: %t.dir/usr/bin/swift)
86

97
// RUN: %t.dir/usr/bin/swift -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-REPL %s
108
// RUN: %t.dir/usr/bin/swift repl -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-REPL %s
11-
//
9+
1210
// CHECK-SWIFT-INVOKES-REPL: {{.*}}/swift -frontend -repl
1311

1412

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-
//
1913
// RUN: %empty-directory(%t.dir)
2014
// RUN: %empty-directory(%t.dir/subpath)
2115
// RUN: echo "print(\"exec: \" + #file)" > %t.dir/stdin
2216
// RUN: echo "print(\"exec: \" + #file)" > %t.dir/t.swift
2317
// 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
3023

3124

3225
// Check that 'swift foo' invokes 'swift-foo'.

0 commit comments

Comments
 (0)