Skip to content

Commit 517d776

Browse files
committed
Test parse of invalid #elif typo
1 parent f7c4cfe commit 517d776

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

Tests/SwiftParserTest/translated/IfconfigExprTests.swift

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,28 @@ final class IfconfigExprTests: XCTestCase {
493493
"""
494494
)
495495
}
496-
496+
497+
func testIfConfigExpr34() {
498+
AssertParse(
499+
"""
500+
#if MY_FLAG
501+
#
502+
elif
503+
#endif
504+
"""
505+
)
506+
}
507+
508+
func testIfConfigExpr35() {
509+
AssertParse(
510+
"""
511+
#if MY_FLAG
512+
# elif
513+
#endif
514+
"""
515+
)
516+
}
517+
497518
func testUnknownPlatform1() {
498519
AssertParse(
499520
"""

0 commit comments

Comments
 (0)