+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.
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
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
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