Only do cleanup on match() in certain cases.
This commit is contained in:
parent
be67a3f58a
commit
c1d700c82e
2 changed files with 10 additions and 6 deletions
|
@ -43,8 +43,9 @@ class AACBasicRichtextTest < TestCase
|
|||
sleep 1
|
||||
|
||||
match(
|
||||
:css => '#content .text-3',
|
||||
:value => "some test for browser\nand some other for browser",
|
||||
:css => '#content .text-3',
|
||||
:value => "some test for browser\nand some other for browser",
|
||||
:cleanup => true,
|
||||
)
|
||||
|
||||
# richtext multi line
|
||||
|
@ -59,8 +60,9 @@ class AACBasicRichtextTest < TestCase
|
|||
sleep 1
|
||||
|
||||
match(
|
||||
:css => '#content .text-5',
|
||||
:value => "some test for browser\nand some other for browser2",
|
||||
:css => '#content .text-5',
|
||||
:value => "some test for browser\nand some other for browser2",
|
||||
:cleanup => true,
|
||||
)
|
||||
end
|
||||
end
|
|
@ -467,8 +467,10 @@ class TestCase < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
# do cleanups (needed for richtext tests)
|
||||
text.gsub!(/\s+$/m, '')
|
||||
params[:value].gsub!(/\s+$/m, '')
|
||||
if params[:cleanup]
|
||||
text.gsub!(/\s+$/m, '')
|
||||
params[:value].gsub!(/\s+$/m, '')
|
||||
end
|
||||
|
||||
match = false
|
||||
if params[:no_quote]
|
||||
|
|
Loading…
Reference in a new issue