Skip to content
Permalink
Browse files
tests: Ensure locale is C.UTF-8 in pool tests
  • Loading branch information
ximion committed Feb 9, 2023
1 parent c249f67 commit 3733565
Showing 1 changed file with 5 additions and 0 deletions.
@@ -19,6 +19,7 @@
*/

#include <config.h>
#include <locale.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <glib/gprintf.h>
@@ -1038,6 +1039,10 @@ main (int argc, char **argv)
return 1;
}

/* ensure locale is reset, to avoid interference when stemming is enabled & tested */
if (setlocale (LC_ALL, "C.UTF-8") == NULL)
g_warning ("Failed to set locale to C.UTF-8");

datadir = argv[1];
g_assert_nonnull (datadir);
datadir = g_build_filename (datadir, "samples", NULL);

0 comments on commit 3733565

Please sign in to comment.