[pypy-svn] pypy default: Write a test that fails on OSX.

arigo commits-noreply at bitbucket.org
Sun Feb 20 13:09:24 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r42185:915ed143c2e5
Date: 2011-02-20 13:04 +0100
http://bitbucket.org/pypy/pypy/changeset/915ed143c2e5/

Log:	Write a test that fails on OSX.

diff --git a/pypy/rlib/test/test_rlocale.py b/pypy/rlib/test/test_rlocale.py
--- a/pypy/rlib/test/test_rlocale.py
+++ b/pypy/rlib/test/test_rlocale.py
@@ -1,10 +1,11 @@
 
 # -*- coding: utf-8 -*-
 
-import py
+import py, sys
 import locale as cpython_locale
 from pypy.rlib.rlocale import setlocale, LC_ALL, LocaleError, isupper, \
-     islower, isalpha, tolower, isalnum, numeric_formatting
+     islower, isalpha, tolower, isalnum, numeric_formatting, external
+from pypy.rpython.lltypesystem import rffi
 
 class TestLocale(object):
     def setup_class(cls):
@@ -34,3 +35,10 @@
     assert isinstance(dec, str)
     assert isinstance(th, str)
     assert isinstance(grouping, str)
+
+def test_libintl():
+    if sys.platform not in ("linux2", "darwin"):
+        py.test.skip("there is (maybe) no libintl here")
+    _gettext = external('gettext', [rffi.CCHARP], rffi.CCHARP)
+    res = _gettext("1234")
+    assert rffi.charp2str(res) == "1234"


More information about the Pypy-commit mailing list