summaryrefslogtreecommitdiff
path: root/src/test/test-parse-util.c
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-01-25 07:40:28 +0100
committerSven Eden <yamakuzure@gmx.net>2018-01-25 23:04:04 +0100
commit7739c87f49c9a17cfecc288289c5ca91cb242607 (patch)
treeff01b7812a8b2906fe3d3311c55b87d4b04497a9 /src/test/test-parse-util.c
parent554c6b4215d081223704042d5dcf4c2d97cd95ba (diff)
test/test-parse-util.c: Masked the test of strtod() with set german
locale to be only used with __GLIBC__. It seems that the strtod() function in stdlib.h from musl_libc does not heed the set locale. It fails with a german floating point number.
Diffstat (limited to 'src/test/test-parse-util.c')
-rw-r--r--src/test/test-parse-util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c
index 0175f3c19..120a8b103 100644
--- a/src/test/test-parse-util.c
+++ b/src/test/test-parse-util.c
@@ -526,7 +526,10 @@ static void test_safe_atod(void) {
assert_se(r == -EINVAL);
errno = 0;
+/// elogind supports musl_libc, and their strtod doesn't seem to use the set locale.
+#if defined(__GLIBC__)
assert_se(fabs(strtod("0,5", &e) - 0.5) < 0.00001);
+#endif // __GLIBC__
}
/* And check again, reset */