Skip to content

Commit 25703b1

Browse files
committed
add test cases for nested interpolation
1 parent 609cca7 commit 25703b1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Tests/SwiftParserTest/Expressions.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,24 @@ final class ExpressionTests: XCTestCase {
194194
return "Fixit: \(range.debugDescription) Text: \"\(text)\""
195195
"""#
196196
}
197+
198+
try AssertParse({ $0.parseExpression() }) {
199+
#"""
200+
"text \(array.map({ "\($0)" }).joined(separator: ",")) text"
201+
"""#
202+
}
203+
204+
try AssertParse({ $0.parseExpression() }) {
205+
#"""
206+
"""
207+
\(gen(xx) { (x) in
208+
return """
209+
case
210+
"""
211+
})
212+
"""
213+
"""#
214+
}
197215
}
198216

199217
func testStringLiterals() throws {

0 commit comments

Comments
 (0)