A simple test follows:
<#assign x = "Hello", y = "World"> <#assign message = "${x}, ${y}!"> ${message}
[${""}] = []
[${"a"}] = [a]
[${"abcdef"}] = [abcdef]
[${"\""}] = ["]
[${"\"\"\""}] = ["""]
[${"a\""}] = [a"]
[${"\"a"}] = ["a]
[${"a\"b"}] = [a"b]
[${"a\nb"}] = [a
b]
[${"'"}] = [']
[${"a'a"}] = [a'a]
[${"\"\'\n\r\f\b\t\l\a\g"}]
[${"\xA\x0A\x00A\x000A\x0000A"}]
[${"\x15Bz\x15b"}]
[${"\x010Cz\x010c"}]
[${''}] = []
[${'a'}] = [a]
[${'abcdef'}] = [abcdef]
[${'"'}] = ["]
[${'"""'}] = ["""]
[${'a"'}] = [a"]
[${'"a'}] = ["a]
[${'a"b'}] = [a"b]
[${'a\nb'}] = [a
b]
[${'\''}] = [']
[${'a\'a'}] = [a'a]
[${'\"\'\n\r\f\b\t\l\a\g'}]
[${'\xA\x0A\x00A\x000A\x0000A'}]
[${'\x15Bz\x15b'}]
[${'\x010Cz\x010c'}]