jellyfin-web/dashboard-ui/bower_components/prism/tests/languages/nix/string_feature.test

56 lines
981 B
Plaintext
Raw Normal View History

2016-02-03 16:00:01 -07:00
""
"foo\"b\\ar"
"f''o'o'\"bar"
"foo
bar"
"foo ${ 42 } baz"
"foo \${ 42 } baz"
''''
''
foo
bar
''
''
f'oo'''ba'r
foo ${ 42 } baz
foo ''${ 42 } baz
''
----------------------------------------------------
[
["string", ["\"\""]],
["string", ["\"foo\\\"b\\\\ar\""]],
["string", ["\"f''o'o'\\\"bar\""]],
["string", ["\"foo\r\nbar\""]],
["string", [
"\"foo ",
["interpolation", [
["antiquotation", "$"],
["punctuation", "{"],
["number", "42"],
["punctuation", "}"]
]],
" baz\""
]],
["string", ["\"foo \\${ 42 } baz\""]],
["string", ["''''"]],
["string", ["''\r\nfoo\r\nbar\r\n''"]],
["string", [
"''\r\nf'oo'''ba'r\r\nfoo ",
["interpolation", [
["antiquotation", "$"],
["punctuation", "{"],
["number", "42"],
["punctuation", "}"]
]],
" baz\r\nfoo ''${ 42 } baz\r\n''"
]]
]
----------------------------------------------------
Checks for strings and string interpolation.
Also checks that escaped interpolations are not interpreted.