From: Bruno Haible Date: Thu, 1 May 2003 10:28:51 +0000 (+0000) Subject: Improved test. X-Git-Tag: v0.12~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee84a9c6a9c8c65368b26f3d9ac3697d45c8531c;p=thirdparty%2Fgettext.git Improved test. --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index 40e41ea2f..6a2169264 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,8 @@ +2003-04-27 Bruno Haible + + * plural-2: Really make the test fail if there is a mismatch. Add a + test for the alternate formula for Russian from the glibc manual. + 2003-04-26 Bruno Haible * msgattrib-15: New file. diff --git a/gettext-tools/tests/plural-2 b/gettext-tools/tests/plural-2 index 09b7cf390..7f8f4fdf1 100755 --- a/gettext-tools/tests/plural-2 +++ b/gettext-tools/tests/plural-2 @@ -8,7 +8,8 @@ tmpfiles="$tmpfiles ll ll.po dataout" test -d ll || mkdir ll test -d ll/LC_MESSAGES || mkdir ll/LC_MESSAGES -cat < plural-2.data hu 0 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -24,9 +25,12 @@ n==1 ? 0 : n==2 ? 1 : 2 lt n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2 20111111112222222222201111111120111111112011111111201111111120111111112011111111201111111120111111112011111111222222222220111111112011111111201111111120111111112011111111201111111120111111112011111111 -ru +ru-gettext n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2 20111222222222222222201112222220111222222011122222201112222220111222222011122222201112222220111222222011122222222222222220111222222011122222201112222220111222222011122222201112222220111222222011122222 +ru-glibc +n%100/10==1 ? 2 : n%10==1 ? 0 : (n+9)%10>3 ? 2 : 1 +20111222222222222222201112222220111222222011122222201112222220111222222011122222201112222220111222222011122222222222222220111222222011122222201112222220111222222011122222201112222220111222222011122222 pl n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2 20111222222222222222221112222222111222222211122222221112222222111222222211122222221112222222111222222211122222222222222222111222222211122222221112222222111222222211122222221112222222111222222211122222 @@ -68,9 +72,10 @@ EOF echo "plural=${formula}" 1>&2 echo "Expected: $dataok" 1>&2 echo "Got: "`cat dataout` 1>&2 + rm -fr $tmpfiles exit 1 } -done +done < plural-2.data rm -fr $tmpfiles