effective-java-3rd-chinese/docs/_style/prism-master/tests/languages/clike/string_feature.test
2019-03-14 13:10:17 +08:00

31 lines
638 B
Plaintext

""
''
"f\"oo"
'b\'ar'
"foo\
bar"
'foo\
bar'
"foo /* comment */ bar"
'foo // bar'
'foo // bar' //comment
----------------------------------------------------
[
["string", "\"\""],
["string", "''"],
["string", "\"f\\\"oo\""],
["string", "'b\\'ar'"],
["string", "\"foo\\\r\nbar\""],
["string", "'foo\\\r\nbar'"],
["string", "\"foo /* comment */ bar\""],
["string", "'foo // bar'"],
["string", "'foo // bar'"],
["comment", "//comment"]
]
----------------------------------------------------
Checks for empty strings, single-line strings and
multi-line strings, both single-quoted and double-quoted.