[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r13215 - trunk/subversion/tests/clients/cmdline

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-03-01 18:40:11 CET

breser@tigris.org writes:

> Author: breser
> Date: Tue Mar 1 10:53:08 2005
> New Revision: 13215

> --- trunk/subversion/tests/clients/cmdline/utf8_tests.py (original)
> +++ trunk/subversion/tests/clients/cmdline/utf8_tests.py Tue Mar 1 10:53:08 2005
> @@ -102,9 +102,14 @@
> except:
> pass
>
> +# Check to see if the locale uses ISO-8859-1 encoding. The regex is necessary
> +# because some systems ommit the first hyphen or use lowercase letters for ISO.
> +localeregex = re.compile('^ISO-?8859-1$', re.I)
> +localematch = localeregex.search(locale.getlocale()[1])
> +
> # list all tests here, starting with None:
> test_list = [ None,
> - Skip(basic_utf8_conversion, locale.getlocale()[1] != 'ISO8859-1')
> + Skip(basic_utf8_conversion, localematch is None)
> ]

That doesn't always work:

$ LANG=C ../svn/subversion/tests/clients/cmdline/utf8_tests.py list
Traceback (most recent call last):
  File "../svn/subversion/tests/clients/cmdline/utf8_tests.py", line 108, in ?
    localematch = localeregex.search(locale.getlocale()[1])
TypeError: expected string or buffer

It works if I use LANG=en_GB or LANG=en_GB.UTF-8.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 1 18:41:20 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.