]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Improved test.
authorBruno Haible <bruno@clisp.org>
Thu, 1 May 2003 10:28:51 +0000 (10:28 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:25 +0000 (12:10 +0200)
gettext-tools/tests/ChangeLog
gettext-tools/tests/plural-2

index 40e41ea2fcc3d144a2c78f2b0dbf7abcb07189c7..6a2169264ab8f41908119100ce4189ac3b3bf932 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-27  Bruno Haible  <bruno@clisp.org>
+
+       * 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  <bruno@clisp.org>
 
        * msgattrib-15: New file.
index 09b7cf390495c95657956e3424002bf80cabbbbf..7f8f4fdf1cfc53214cc7c5ad6ba72dc694a8a99c 100755 (executable)
@@ -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 <<EOF |
+tmpfiles="$tmpfiles plural-2.data"
+cat <<EOF > 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