Skip to content

Commit 1dd49c8

Browse files
author
David Ungar
committed
Added a test.
1 parent 17a81f6 commit 1dd49c8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Ensure that the -### and -driver-print-jobs options work properly in batch
2+
// mode. They should each do the same thing, so test them both.
3+
//
4+
// Test be sure that the output does reflect the batching, in other words
5+
// multiple primary files. Also test to be sure that the output is on
6+
// stdout, and NOT stderr.
7+
8+
9+
// RUN: %empty-directory(%t)
10+
// RUN: touch %t/file-01.swift %t/file-02.swift %t/file-03.swift
11+
// RUN: echo 'public func main() {}' >%t/main.swift
12+
//
13+
// RUN: %swiftc_driver -enable-batch-mode -c -emit-module -module-name main -j 2 %t/file-01.swift %t/file-02.swift %t/file-03.swift %t/main.swift -driver-print-jobs 2>%t/shouldBeEmpty1 | %FileCheck %s -check-prefix=CHECK-COMBINED
14+
// RUN: %swiftc_driver -enable-batch-mode -c -emit-module -module-name main -j 2 %t/file-01.swift %t/file-02.swift %t/file-03.swift %t/main.swift -### 2>%t/shouldBeEmpty2 | %FileCheck %s -check-prefix=CHECK-COMBINED
15+
// RUN: test -z "`cat %t/shouldBeEmpty1`"
16+
// RUN: test -z "`cat %t/shouldBeEmpty2`"
17+
//
18+
// CHECK-COMBINED: -primary-file {{.*}}/file-01.swift -primary-file {{.*}}/file-02.swift {{.*}}/file-03.swift {{.*}}/main.swift

0 commit comments

Comments
 (0)