Skip to content

Commit 7834028

Browse files
author
Harlan Haskins
committed
[ParseableInterface] Add test for multi-line attribute message
1 parent a61d1f6 commit 7834028

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// RUN: %empty-directory(%t)
2+
3+
// RUN: %target-swift-frontend -typecheck -module-name Test -emit-parseable-module-interface-path %t/Test.swiftinterface %s
4+
// RUN: %FileCheck %s < %t/Test.swiftinterface
5+
// RUN: %target-swift-frontend -build-module-from-parseable-interface %t/Test.swiftinterface -o %t/Test.swiftmodule
6+
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules -emit-parseable-module-interface-path - %t/Test.swiftmodule -module-name Test | %FileCheck %s
7+
8+
// CHECK: @available(*, unavailable, message: "First line.\nAnother line!")
9+
// CHECK: public func catastrophicFunction()
10+
@available(*,
11+
unavailable,
12+
message: """
13+
First line.
14+
Another line!
15+
""")
16+
public func catastrophicFunction() {}
17+
18+
// CHECK: @available(*, unavailable, message: "\n First line.\n Another line!")
19+
// CHECK: public func catastrophicFunction2()
20+
@available(*, unavailable, message: "\n First line.\n Another line!")
21+
public func catastrophicFunction2() {}

0 commit comments

Comments
 (0)