Skip to content

Commit d20b4ed

Browse files
committed
Cover some rspace/lspace branches in CaptureEndEngine
1 parent 49f1b33 commit d20b4ed

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/test.rb

+8
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,14 @@ def self.quux
278278
@a.must_equal 'bar'
279279
end
280280

281+
it "should handle trailing rspace with - modifier in <%|= and <%|" do
282+
eval(::Erubi::CaptureEndEngine.new("<%|= '&' -%>\n<%| -%>\n").src).must_equal '&'
283+
end
284+
285+
it "should handle lspace in <%|=" do
286+
eval(::Erubi::CaptureEndEngine.new("<%|= %><%| %><%|= %><%| %>").src).must_equal ''
287+
end
288+
281289
it "should have <%|= with CaptureEndEngine not escape by default" do
282290
eval(::Erubi::CaptureEndEngine.new('<%|= "&" %><%| %>').src).must_equal '&'
283291
eval(::Erubi::CaptureEndEngine.new('<%|= "&" %><%| %>', :escape=>false).src).must_equal '&'

0 commit comments

Comments
 (0)