blob: 5f5049ce0f712add925d46e372047109c949e72d [file] [log] [blame]
class HeredocsTest extends GroovyTestCase {
void testHeredocs() {
name = "James"
s = <<<EOF
abcd
efg
hijk
hello ${name}
EOF
println s
assert s != null
assert s instanceof GString
assert s.contains("i")
assert s.contains("James")
}
void testDollarEscaping() {
s = <<<EOF
hello $${name}
EOF
println s
assert s != null
assert s.contains("$")
c = s.count("$")
assert c == 1
}
}