Skip to content

Commit

Permalink
[Scala] Add some escape tests for triple quoted
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Jan 7, 2025
1 parent 3483873 commit 0ceda01
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Scala/syntax_test_scala.scala
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,18 @@ type Foo = Bar[A] forSome { type A }
"bad escaping: \p"
// ^ invalid.illegal.lone-escape.scala

"""testing"""
// ^^^^^^^^^^^^^ meta.string.scala string.quoted.triple.scala

"""escaped in triple: \u1221 \125 \n"""
//^^^ punctuation.definition.string.begin.scala
// ^^^^^^ constant.character.escape.scala
// ^^^ - constant.character.escape.scala
// ^^ - constant.character.escape.scala
// ^^^^ - constant.character
// ^^ - constant.character
// ^^^ punctuation.definition.string.end.scala

"""testing"""
// ^^^^^^^^^^^^^ meta.string.scala string.quoted.triple.scala
"""not bad in triple: \p"""
// ^^ - constant.character - invalid

s"testing $a ${42}"
// ^^^^^^^^^^ meta.string.interpolated.scala string.quoted.double.scala - meta.interpolation
Expand Down

0 comments on commit 0ceda01

Please sign in to comment.