]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
xgettext: Verify parsing of JavaScript template literals inside objects.
authorBruno Haible <bruno@clisp.org>
Sun, 29 Sep 2019 08:54:32 +0000 (10:54 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Apr 2020 11:19:32 +0000 (13:19 +0200)
Reported by Andy Holmes <andrew.g.r.holmes@gmail.com>
in <https://savannah.gnu.org/bugs/?50920>.

* gettext-tools/tests/xgettext-javascript-7: Test template literals inside an
object.

gettext-tools/tests/xgettext-javascript-7

index 2d612a96ddce3b4e195168e275ddc5664958c409..1f668f9baa9d76bc47640f540fec2b89732a7b5b 100755 (executable)
@@ -21,6 +21,9 @@ var f1 = function () {
   return _("first normal string") + `${foo}` + _("second normal string");
 };
 var s11 = _("another normal string");
+var s12 = { property: `A template literal with ${n} substitution` };
+var s13 = _("yet another normal string");
+
 EOF
 
 : ${XGETTEXT=xgettext}
@@ -78,6 +81,9 @@ msgstr ""
 
 msgid "another normal string"
 msgstr ""
+
+msgid "yet another normal string"
+msgstr ""
 EOF
 
 : ${DIFF=diff}