>From add60ae85dfed81d85df371631415b48b9673fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Fri, 27 Nov 2020 14:49:12 +0100 Subject: [PATCH 1/2] tests: Add Lisp and Scheme plural cases. * gettext-tools/tests/format-lisp-2 (f-l-2.data): Add tests for goto format specifier and narrowing types on plural forms. * gettext-tools/tests/format-scheme-2 (f-sc-2.data): Likewise. --- gettext-tools/tests/format-lisp-2 | 15 +++++++++++++++ gettext-tools/tests/format-scheme-2 | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/gettext-tools/tests/format-lisp-2 b/gettext-tools/tests/format-lisp-2 index a3958e989..c1e8e15ad 100755 --- a/gettext-tools/tests/format-lisp-2 +++ b/gettext-tools/tests/format-lisp-2 @@ -168,6 +168,21 @@ msgid "abc~{~c~c~}" msgid_plural "abc~{~c~c~}" msgstr[0] "xyz~{~c~d~}" msgstr[1] "xyz~{~c~d~}" +# Valid: goto format specifier on plural forms same +msgid "~*one abc" +msgid_plural "~d abcs" +msgstr[0] "~*one abc" +msgstr[1] "~d abcs" +# Valid: goto format specifier on plural forms different +msgid "~d abc" +msgid_plural "~d abcs" +msgstr[0] "~* xyz" +msgstr[1] "~d xyz" +# Invalid: narrowing type on the translation +msgid "~a thing" +msgid_plural "~a things" +msgstr[0] "~d thing" +msgstr[1] "~d things" EOF : ${MSGFMT=msgfmt} diff --git a/gettext-tools/tests/format-scheme-2 b/gettext-tools/tests/format-scheme-2 index 5dd074511..3255b8388 100755 --- a/gettext-tools/tests/format-scheme-2 +++ b/gettext-tools/tests/format-scheme-2 @@ -183,6 +183,21 @@ msgid "abc~{~c~c~}" msgid_plural "abc~{~c~c~}" msgstr[0] "xyz~{~c~d~}" msgstr[1] "xyz~{~c~d~}" +# Valid: goto format specifier on plural forms same +msgid "~*one abc" +msgid_plural "~d abcs" +msgstr[0] "~*one abc" +msgstr[1] "~d abcs" +# Valid: goto format specifier on plural forms different +msgid "~d abc" +msgid_plural "~d abcs" +msgstr[0] "~* xyz" +msgstr[1] "~d xyz" +# Invalid: narrowing type on the translation +msgid "~a thing" +msgid_plural "~a things" +msgstr[0] "~d thing" +msgstr[1] "~d things" EOF : ${MSGFMT=msgfmt} -- 2.29.2