aboutsummaryrefslogtreecommitdiff
path: root/test/suites/api/test_dump.c
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2011-10-02 21:27:53 +0300
committerPetri Lehtinen <petri@digip.org>2011-10-02 21:31:17 +0300
commitd7ddbf366197605642f725cce6165dfb179a114e (patch)
tree56da549f28dbe1631a2539374c53b0c85293e2c1 /test/suites/api/test_dump.c
parentb6d0191e51003dfdfd2dcb36a52baafcdbf4246c (diff)
downloadjansson-d7ddbf366197605642f725cce6165dfb179a114e.zip
jansson-d7ddbf366197605642f725cce6165dfb179a114e.tar.gz
jansson-d7ddbf366197605642f725cce6165dfb179a114e.tar.bz2
Make real number encoding and decoding work under all locales
The decimal point '.' is changed to locale's decimal point before/after JSON conversion to make C standard library's locale-specific string conversion functions work correctly. All the tests now call setlocale(LC_ALL, "") on startup to use the locale set in the environment. Fixes GH-32.
Diffstat (limited to 'test/suites/api/test_dump.c')
-rw-r--r--test/suites/api/test_dump.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/suites/api/test_dump.c b/test/suites/api/test_dump.c
index 17d588b..97544ba 100644
--- a/test/suites/api/test_dump.c
+++ b/test/suites/api/test_dump.c
@@ -133,10 +133,9 @@ static void encode_other_than_array_or_object()
}
-int main()
+static void run_tests()
{
encode_twice();
circular_references();
encode_other_than_array_or_object();
- return 0;
}