diff --git a/test/fixtures/end_of_input.coffee b/test/fixtures/end_of_input.coffee new file mode 100644 index 0000000..b6daa80 --- /dev/null +++ b/test/fixtures/end_of_input.coffee @@ -0,0 +1,8 @@ +for label in @columnLabels + __out.push '\n \n\n ' + if label + __out.push '\n \n ' + else + __out.push '\n \n ' + __out.push '\n' +__out.push '\n' diff --git a/test/fixtures/end_of_input.eco b/test/fixtures/end_of_input.eco new file mode 100644 index 0000000..c5013af --- /dev/null +++ b/test/fixtures/end_of_input.eco @@ -0,0 +1,13 @@ +<% for label in @columnLabels: %> + + + <% if label: %> + + <% else: %> + + <% end %> +<% end %> diff --git a/test/test_compile.coffee b/test/test_compile.coffee index b1036dd..2f34c41 100644 --- a/test/test_compile.coffee +++ b/test/test_compile.coffee @@ -6,6 +6,10 @@ module.exports = test.ok eco.compile fixture("hello.eco") test.done() + "compiling fixtures/end_of_input.eco": (test) -> + test.ok eco.compile fixture("end_of_input.eco") + test.done() + "compiling fixtures/projects.eco": (test) -> test.ok eco.compile fixture("projects.eco") test.done() diff --git a/test/test_preprocessor.coffee b/test/test_preprocessor.coffee index e2303b3..dbb716e 100644 --- a/test/test_preprocessor.coffee +++ b/test/test_preprocessor.coffee @@ -6,6 +6,10 @@ module.exports = test.same fixture("hello.coffee"), preprocess fixture("hello.eco") test.done() + "preprocessing fixtures/end_of_input.eco": (test) -> + test.same fixture("end_of_input.coffee"), preprocess fixture("end_of_input.eco") + test.done() + "preprocessing fixtures/projects.eco": (test) -> test.same fixture("projects.coffee"), preprocess fixture("projects.eco") test.done()