jellyfin-web/dashboard-ui/bower_components/prism/tests/languages/puppet/interpolation_feature.test
2016-02-03 18:00:01 -05:00

54 lines
1.7 KiB
Plaintext

"$foo ${::foo} ${foo::bar.foobar}
${foobar(42)} ${::interfaces.split(",")[3]}
${[1,20,3].filter |$value| { $value < 10 }}"
----------------------------------------------------
[
["string", [["double-quoted", [
"\"",
["interpolation", ["$foo"]],
["interpolation", [
["delimiter", "$"], ["punctuation", "{"],
["short-variable", [["punctuation", "::"], "foo"]],
["punctuation", "}"]
]],
["interpolation", [
["delimiter", "$"], ["punctuation", "{"],
["short-variable", ["foo", ["punctuation", "::"], "bar"]],
["punctuation", "."], ["function", "foobar"],
["punctuation", "}"]
]],
["interpolation", [
["delimiter", "$"], ["punctuation", "{"],
["function", "foobar"], ["punctuation", "("],
["number", "42"], ["punctuation", ")"],
["punctuation", "}"]
]],
["interpolation", [
["delimiter", "$"], ["punctuation", "{"],
["short-variable", [["punctuation", "::"], "interfaces"]],
["punctuation", "."], ["function", "split"],
["punctuation", "("], ["string", [["double-quoted", ["\",\""]]]],
["punctuation", ")"], ["punctuation", "["],
["number", "3"], ["punctuation", "]"],
["punctuation", "}"]
]],
["interpolation", [
["delimiter", "$"], ["punctuation", "{"],
["punctuation", "["], ["number", "1"],
["punctuation", ","], ["number", "20"],
["punctuation", ","], ["number", "3"], ["punctuation", "]"],
["punctuation", "."], ["function", "filter"],
["operator", "|"], ["variable", ["$value"]], ["operator", "|"],
["punctuation", "{"], ["variable", ["$value"]],
["operator", "<"], ["number", "10"], ["punctuation", "}"],
["punctuation", "}"]
]],
"\""
]]]]
]
----------------------------------------------------
Checks for interpolation.