summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/tools/test.html1
-rw-r--r--test/tools/testHtmlExtractor.js4
-rw-r--r--test/webhelper/testTranslate2.js5
3 files changed, 9 insertions, 1 deletions
diff --git a/test/tools/test.html b/test/tools/test.html
index 6687013..18c07e3 100644
--- a/test/tools/test.html
+++ b/test/tools/test.html
@@ -20,6 +20,7 @@
but that doesn't matter to HTML.
</p>
<span name="translatable">String with a "quote"</span>
+ <span name="translatable">String with<br>embedded <b>tags</b></span>
</section>
</body>
</html>
diff --git a/test/tools/testHtmlExtractor.js b/test/tools/testHtmlExtractor.js
index 7d622e1..c1bde4e 100644
--- a/test/tools/testHtmlExtractor.js
+++ b/test/tools/testHtmlExtractor.js
@@ -11,7 +11,9 @@ _("Choose a template");\n\
#line 21 "test/tools/test.html"\n\
_("This is a string that is spread over multiple lines, but that doesn\'t matter to HTML.");\n\
#line 22 "test/tools/test.html"\n\
-_("String with a \\"quote\\"");\n';
+_("String with a \\"quote\\"");\n\
+#line 23 "test/tools/test.html"\n\
+_("String with<br>embedded <b>tags</b>");\n';
describe('eos-html-extractor', function () {
it('works correctly at a minimum', function () {
diff --git a/test/webhelper/testTranslate2.js b/test/webhelper/testTranslate2.js
index 9cb7042..12a18f6 100644
--- a/test/webhelper/testTranslate2.js
+++ b/test/webhelper/testTranslate2.js
@@ -150,6 +150,11 @@ describe('WebHelper2 translator', function () {
run_loop('<p name="translatable">String with "quotes"</p>');
expect(gettext_spy).toHaveBeenCalledWith('String with "quotes"');
});
+
+ it('handles embedded tags correctly', function () {
+ run_loop('<p name="translatable">Embedded<br><b>tags</b></p>');
+ expect(gettext_spy).toHaveBeenCalledWith('Embedded<br><b>tags</b>');
+ });
});
describe('used from client-side Javascript', function () {