trim newline

This commit is contained in:
leaf corcoran
2013-10-23 23:35:01 -07:00
parent 8957308167
commit 5cf2890dba
2 changed files with 28 additions and 1 deletions

View File

@@ -76,12 +76,28 @@ This is my message to <%= [=[oh yeah %>"]=] %>]]
visitor: "yeah"
}
}
{
"hello"
"<%= 'hello' -%>
"
}
}
for case in *cases
it "should run template", ->
assert.same case[1], render unpack case, 2
it "should error on unclosed tag", ->
assert.has_error ->
render "hello <%= world"
it "should fail on bad template", ->
assert.has_error ->
render "hello <%= if hello then print(nil) end%>"
describe "Parser.in_string", ->
cases = {
{ "hello world", false }