Only do cleanup on match() in certain cases.

This commit is contained in:
Martin Edenhofer 2015-04-14 23:49:46 +02:00
parent be67a3f58a
commit c1d700c82e
2 changed files with 10 additions and 6 deletions

View file

@ -45,6 +45,7 @@ class AACBasicRichtextTest < TestCase
match(
:css => '#content .text-3',
:value => "some test for browser\nand some other for browser",
:cleanup => true,
)
# richtext multi line
@ -61,6 +62,7 @@ class AACBasicRichtextTest < TestCase
match(
:css => '#content .text-5',
:value => "some test for browser\nand some other for browser2",
:cleanup => true,
)
end
end

View file

@ -467,8 +467,10 @@ class TestCase < Test::Unit::TestCase
end
# do cleanups (needed for richtext tests)
if params[:cleanup]
text.gsub!(/\s+$/m, '')
params[:value].gsub!(/\s+$/m, '')
end
match = false
if params[:no_quote]