# Remove
ERB.new("a \nb <% 0 -%>\n c", nil, '-').result == "a \nb c" or raise
# Don't do anything: not followed by newline, but by space:
ERB.new("a\n<% 0 -%> \nc", nil, '-').result == "a\nb \nc" or raise
# Remove the current line because only whitesapaces:
Erubis::Eruby.new(" <% 0 %> \nb").result == 'b' or raise
# Same as above, thus useless because longer.
Erubis::Eruby.new(" <% 0 -%> \nb").result == 'b' or raise
# Don't do anything because line not empty.
Erubis::Eruby.new("a <% 0 %> \nb").result == "a \nb" or raise
Erubis::Eruby.new(" <% 0 %> a\nb").result == " a\nb" or raise
Erubis::Eruby.new(" <% 0 -%> a\nb").result == " a\nb" or raise
# Don't remove the current line because of `=`:
Erubis::Eruby.new(" <%= 0 %> \nb").result == " 0 \nb" or raise
# Remove the current line even with `=`:
Erubis::Eruby.new(" <%= 0 -%> \nb").result == " 0b" or raise
# Remove forward only because of `-` and non space before:
Erubis::Eruby.new("a <%= 0 -%> \nb").result == "a 0b" or raise
# Don't do anything because non-whitespace forward:
Erubis::Eruby.new(" <%= 0 -%> a\nb").result == " 0 a\nb" or raise