Commit 60e3d1f2 authored by Daniel Gustafsson's avatar Daniel Gustafsson
Browse files

unittest: make 1652 stable across collations



The previous coding used a format string whose output depended on the
current locale of the environment running the test. Since the gist of
the test is to have a format string, with the actual formatting being
less important, switch to a more stable formatstring with decimals.

Reported-by: Marcel Raad
Closes #3234
Reviewed-by: default avatarDaniel Stenberg <daniel@haxx.se>
Reviewed-by: default avatarMarcel Raad <Marcel.Raad@teamviewer.com>
parent d9abebc7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -85,8 +85,8 @@ Curl_infof(data, "%s", input);
fail_unless(strcmp(result, input) == 0, "Simple string test");

/* Injecting a few different variables with a format */
Curl_infof(data, "%s %u testing %.1f\n", input, 42, 43.0123324);
fail_unless(strcmp(result, "Simple Test 42 testing 43.0\n") == 0,
Curl_infof(data, "%s %u testing %lu\n", input, 42, 43L);
fail_unless(strcmp(result, "Simple Test 42 testing 43\n") == 0,
            "Format string");

/* Variations of empty strings */