Support quotes at the end of a raw string
Fix for KT-4650 Can't use double quote at the end of the raw string #KT-4650 Fixed
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
class P(val actual: String, val expected: String)
|
||||
fun array(vararg s: P) = s
|
||||
|
||||
fun box() : String {
|
||||
val data = array(
|
||||
P("""""", ""),
|
||||
P(""""""", "\""),
|
||||
P("""""""", "\"\""),
|
||||
P(""""""""", "\"\"\""),
|
||||
P("""""""""", "\"\"\"\""),
|
||||
P("""" """, "\" "),
|
||||
P(""""" """, "\"\" "),
|
||||
P(""" """", " \""),
|
||||
P(""" """"", " \"\""),
|
||||
P(""" """""", " \"\"\""),
|
||||
P(""" """"""", " \"\"\"\""),
|
||||
P(""" """""""", " \"\"\"\"\""),
|
||||
P("""" """", "\" \""),
|
||||
P(""""" """"", "\"\" \"\"")
|
||||
)
|
||||
|
||||
for (i in 0..data.size-1) {
|
||||
val p = data[i]
|
||||
if (p.actual != p.expected) return "Fail at #$i. actual='${p.actual}', expected='${p.expected}'"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user