From 9fd6d7af0fde2d23f1e75c1d8a88495e0518c3b1 Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Sat, 1 Feb 2014 12:09:46 -0800 Subject: [PATCH] test for buffer re-use --- spec/etlua_spec.moon | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/etlua_spec.moon b/spec/etlua_spec.moon index e1de119..1566c8c 100644 --- a/spec/etlua_spec.moon +++ b/spec/etlua_spec.moon @@ -106,6 +106,12 @@ This is my message to <%= [=[oh yeah %>"]=] %>]] there is nothing left ]] + it "should use existing buffer", -> + fn = compile "hello<%= 'yeah' %>" + buff = {"first"} + out = fn {}, buff + assert.same "firsthelloyeah", out + describe "Parser.in_string", -> cases = { { "hello world", false }