Skip to content

Commit 5f6cd4b

Browse files
committed
add tests for end of input
1 parent 099dfa7 commit 5f6cd4b

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

test/fixtures/end_of_input.coffee

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
for label in @columnLabels
2+
__out.push '\n <select>\n <option value=\'\'>\n Please select a form field label.\n </option>\n </select>\n\n '
3+
if label
4+
__out.push '\n <i class=\'column-alert\' title=\'one\'></i>\n '
5+
else
6+
__out.push '\n <i class=\'column-alert\' title=\'Values in this column will not\'></i>\n '
7+
__out.push '\n'
8+
__out.push '\n'

test/fixtures/end_of_input.eco

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<% for label in @columnLabels: %>
2+
<select>
3+
<option value=''>
4+
Please select a form field label.
5+
</option>
6+
</select>
7+
8+
<% if label: %>
9+
<i class='column-alert' title='one'></i>
10+
<% else: %>
11+
<i class='column-alert' title='Values in this column will not'></i>
12+
<% end %>
13+
<% end %>

test/test_compile.coffee

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ module.exports =
66
test.ok eco.compile fixture("hello.eco")
77
test.done()
88

9+
"compiling fixtures/end_of_input.eco": (test) ->
10+
test.ok eco.compile fixture("end_of_input.eco")
11+
test.done()
12+
913
"compiling fixtures/projects.eco": (test) ->
1014
test.ok eco.compile fixture("projects.eco")
1115
test.done()

test/test_preprocessor.coffee

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ module.exports =
66
test.same fixture("hello.coffee"), preprocess fixture("hello.eco")
77
test.done()
88

9+
"preprocessing fixtures/end_of_input.eco": (test) ->
10+
test.same fixture("end_of_input.coffee"), preprocess fixture("end_of_input.eco")
11+
test.done()
12+
913
"preprocessing fixtures/projects.eco": (test) ->
1014
test.same fixture("projects.coffee"), preprocess fixture("projects.eco")
1115
test.done()

0 commit comments

Comments
 (0)