Skip to content

Commit b72fb1c

Browse files
committed
Test zero-width chars nested within false delimiter
1 parent e53290d commit b72fb1c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/Parse/raw_string.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,14 @@ _ = ##"""
6868
"""##
6969
// CHECK: "a raw string with \"\"\" in it"
7070

71-
_ = #"""#
72-
// CHECK: "\""
71+
// ===---------- False Multiline Delimiters --------===
72+
73+
/// Source code contains zero-width character in this format `#"[U+200B]"[U+200B]"#`
74+
/// The check contains the zero-width character in this format: `"[U+200B]\"[U+200B]"`
75+
/// Use this test when implementating `diagnoseZeroWidthMatchAndAdvance`.
76+
/// See https://bugs.swift.org/browse/SR-8678
77+
_ = #"​"​"#
78+
// CHECK: "​\"​"
7379

7480
_ = #""""#
7581
// CHECK: "\"\""
@@ -80,6 +86,9 @@ _ = #"""""#
8086
_ = #""""""#
8187
// CHECK: "\"\"\"\""
8288

89+
_ = #"""#
90+
// CHECK: "\""
91+
8392
_ = ##""" foo # "# "##
8493
// CHECK: "\"\" foo # \"# "
8594

0 commit comments

Comments
 (0)