Kaydet (Commit) a00520d3 authored tarafından David Tardon's avatar David Tardon

don't assume concrete spelling substitutions

E.g., on my F-27 with system hunspell 1.5.4, the substitutions are

dogg -> dodgy
catt -> cat
frogg -> frog

which causes the test to fail...

Change-Id: I6d192fcc74629c2f3b9d4780576499c47de96b26
üst 8b7910e0
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# #
import re
from uitest.framework import UITestCase from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict from uitest.uihelper.common import get_state_as_dict
...@@ -41,14 +43,14 @@ frogg catt dogg ...@@ -41,14 +43,14 @@ frogg catt dogg
dogg catt dogg catt
frog, dogg, catt""" frog, dogg, catt"""
TDF46852_CORRECTED = """\ TDF46852_REGEX = """\
dog ([a-z]+)
dog \\1
tact dog ([a-z]+) \\1
frog frog ([a-z]+) \\3
frog tact dog \\3 \\2 \\1
dog tact \\1 \\2
frog, dog, tact""" \\3, \\1, \\2"""
def test_tdf46852(self): def test_tdf46852(self):
supported_locale = self.is_supported_locale("en", "US") supported_locale = self.is_supported_locale("en", "US")
...@@ -92,5 +94,5 @@ frog, dog, tact""" ...@@ -92,5 +94,5 @@ frog, dog, tact"""
) )
) )
self.assertEqual(document.Text.getString(), self.TDF46852_CORRECTED) self.assertTrue(re.match(self.TDF46852_REGEX, document.Text.getString()))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment