assert_se(r == -EINVAL);
errno = 0;
- assert_se(fabs(strtod("0,5", &e) - 0.5) < 0.00001);
+ assert_se(fabs(strtod("0.5", &e) - 0.5) < 0.00001);
/* And check again, reset */
setlocale(LC_NUMERIC, "C");
assert_se(strlen(strshorten(s, 0)) == 0);
}
+static void test_strappenda(void) {
+ char *actual;
+
+ actual = strappenda("", "foo", "bar");
+ assert_se(streq(actual, "foobar"));
+
+ actual = strappenda("foo", "bar", "baz");
+ assert_se(streq(actual, "foobarbaz"));
+
+ actual = strappenda("foo", "", "bar", "baz");
+ assert_se(streq(actual, "foobarbaz"));
+}
+
int main(int argc, char *argv[]) {
log_parse_environment();
log_open();
test_read_one_char();
test_ignore_signals();
test_strshorten();
+ test_strappenda();
return 0;
}