Hi Jeff,
On 12/2/19 6:52 PM, Jeff Smith wrote:
- locale = p_setlocale(LC_ALL, NULL);
- p_setlocale(LC_ALL, "fr-FR");
setlocale may fail if the system is not supporting given locale. Please skip the test in this case.
- ret = p_strftime(buf, sizeof(buf), "%c", &epoch);
- ok(ret == strlen(expected), "ret = %d\n", ret);
- ok(!strcmp(buf, expected), "buf = "%s", expected "%s"\n", buf, expected);
- ret = p_strftime(buf, sizeof(buf), "%x %r", &epoch);
- todo_wine ok(ret == strlen(expected), "ret = %d\n", ret);
- todo_wine ok(!strcmp(buf, expected), "buf = "%s", expected "%s"\n", buf, expected);
Please change it to: ok(ret == strlen(buf), "ret = %d\n", ret); todo_wine ok(!strcmp(buf, "01/01/1970 00:00:00"), ...); It makes the expected variable not needed. I think the test is easier to read this way.
- p_setlocale(LC_ALL, locale);
Please restore C locale after the test (there's no need to store previous locale).
Thanks, Piotr