TestCase: set locale from the environment
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 20 Mar 2013 11:34:37 +0000 (11:34 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 20 Mar 2013 16:43:11 +0000 (16:43 +0000)
commit93d0f7d220588afc3b7521d2428426a8863267dd
treebb1afae842052b679831d6931c1f294d49fac6f0
parent0f8247ac2fe9f87207a0c4de2023b5ca74478de6
TestCase: set locale from the environment

This fixes an annoyance I'd had for a while: UTF-8 arrows etc.
in debug messages came out as "?", because until we call setlocale()
we're in the C locale, whose character set is ASCII (and some layer
of library responds by transcoding our strings into ASCII).

With this change, running the tests in en_GB.UTF-8 results in
Unicode arrows and more comprehensible output.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=696179
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip@tecnocode.co.uk>
tests/lib/test-case.vala