[grilo-plugins/wip/hadess/no-chromaprint: 9/9] tests: Enable UTF-8 support
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins/wip/hadess/no-chromaprint: 9/9] tests: Enable UTF-8 support
- Date: Wed, 13 Nov 2019 12:44:57 +0000 (UTC)
commit ac73217545e98ffaec9a5e064392b4ca215d1a04
Author: Bastien Nocera <hadess hadess net>
Date: Sat Sep 28 12:04:17 2019 +0200
tests: Enable UTF-8 support
No UTF-8 or i18n support if we don't run setlocale().
tests/chromaprint/test_chromaprint_resolve.c | 3 +++
tests/dleyna/test_dleyna.c | 3 +++
tests/games/test_games.c | 3 +++
tests/local-metadata/test_local_metadata.c | 3 +++
tests/lua-factory/sources/test_lua_acoustid.c | 3 +++
tests/lua-factory/sources/test_lua_theaudiodb.c | 3 +++
tests/lua-factory/test_lua_factory_grl_media.c | 3 +++
tests/lua-factory/test_lua_factory_source_errors.c | 3 +++
tests/lua-factory/test_lua_factory_xml_parser.c | 3 +++
tests/spotify-cover/test_spotify_cover.c | 3 +++
tests/steam-store/test_steam_store.c | 3 +++
tests/thetvdb/test_thetvdb_resolve_episodes.c | 3 +++
tests/thetvdb/test_thetvdb_resolve_shows.c | 3 +++
tests/thetvdb/test_thetvdb_resolve_stress.c | 3 +++
tests/tmdb/test_tmdb_fast_resolution.c | 3 +++
tests/tmdb/test_tmdb_fast_resolution_by_id.c | 3 +++
tests/tmdb/test_tmdb_full_resolution.c | 3 +++
tests/tmdb/test_tmdb_missing_configuration.c | 3 +++
tests/tmdb/test_tmdb_preconditions.c | 3 +++
tests/vimeo/test_vimeo.c | 3 +++
20 files changed, 60 insertions(+)
---
diff --git a/tests/chromaprint/test_chromaprint_resolve.c b/tests/chromaprint/test_chromaprint_resolve.c
index 36807086..6181f86b 100644
--- a/tests/chromaprint/test_chromaprint_resolve.c
+++ b/tests/chromaprint/test_chromaprint_resolve.c
@@ -21,6 +21,7 @@
*/
#include "test_chromaprint_utils.h"
+#include <locale.h>
#include <grilo.h>
static void
@@ -100,6 +101,8 @@ test_fingerprint (void)
gint
main (gint argc, gchar **argv)
{
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", CHROMAPRINT_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", CHROMAPRINT_ID, TRUE);
diff --git a/tests/dleyna/test_dleyna.c b/tests/dleyna/test_dleyna.c
index 68cd0839..19ccdabb 100644
--- a/tests/dleyna/test_dleyna.c
+++ b/tests/dleyna/test_dleyna.c
@@ -15,6 +15,7 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <locale.h>
#include "test_dleyna_utils.h"
typedef struct {
@@ -429,6 +430,8 @@ test_notifications (TestDleynaFixture *fixture,
int
main(int argc, char **argv)
{
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", GRILO_PLUGINS_TESTS_DLEYNA_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", DLEYNA_PLUGIN_ID, TRUE);
diff --git a/tests/games/test_games.c b/tests/games/test_games.c
index 0c3fffc2..00efba89 100644
--- a/tests/games/test_games.c
+++ b/tests/games/test_games.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#define THEGAMESDB "grl-thegamesdb"
@@ -340,6 +341,8 @@ main(int argc, char **argv)
{
gint result;
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", LUA_FACTORY_PLUGIN_PATH, TRUE);
g_setenv ("GRL_LUA_SOURCES_PATH", LUA_SOURCES_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", "grl-lua-factory", TRUE);
diff --git a/tests/local-metadata/test_local_metadata.c b/tests/local-metadata/test_local_metadata.c
index 246beab2..a4db617b 100644
--- a/tests/local-metadata/test_local_metadata.c
+++ b/tests/local-metadata/test_local_metadata.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#define LUA_FACTORY_ID "grl-lua-factory"
@@ -188,6 +189,8 @@ test_title_override (void)
int
main(int argc, char **argv)
{
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", LUA_FACTORY_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", LUA_FACTORY_ID, TRUE);
g_setenv ("GRL_LUA_SOURCES_PATH", LUA_SOURCES_PATH, TRUE);
diff --git a/tests/lua-factory/sources/test_lua_acoustid.c b/tests/lua-factory/sources/test_lua_acoustid.c
index 58e8aa37..1eeeba2d 100644
--- a/tests/lua-factory/sources/test_lua_acoustid.c
+++ b/tests/lua-factory/sources/test_lua_acoustid.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include "test_lua_factory_utils.h"
#define ACOUSTID_ID "grl-acoustid"
@@ -329,6 +330,8 @@ test_acoustid_setup (gint *p_argc,
gint
main (gint argc, gchar **argv)
{
+ setlocale (LC_ALL, "");
+
test_acoustid_setup (&argc, &argv);
g_test_add_func ("/lua_factory/sources/acoustid/resolve/fingerprint",
diff --git a/tests/lua-factory/sources/test_lua_theaudiodb.c b/tests/lua-factory/sources/test_lua_theaudiodb.c
index 506e8878..39548f3f 100644
--- a/tests/lua-factory/sources/test_lua_theaudiodb.c
+++ b/tests/lua-factory/sources/test_lua_theaudiodb.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include "test_lua_factory_utils.h"
#define THEAUDIODB_ID "grl-theaudiodb-cover"
@@ -178,6 +179,8 @@ test_theaudiodb_setup (gint *p_argc,
gint
main (gint argc, gchar **argv)
{
+ setlocale (LC_ALL, "");
+
test_theaudiodb_setup (&argc, &argv);
g_test_add_func ("/lua_factory/sources/theaudiodb/resolve/albumcover",
diff --git a/tests/lua-factory/test_lua_factory_grl_media.c b/tests/lua-factory/test_lua_factory_grl_media.c
index 8759c246..77244418 100644
--- a/tests/lua-factory/test_lua_factory_grl_media.c
+++ b/tests/lua-factory/test_lua_factory_grl_media.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#include <string.h>
#include <json-glib/json-glib.h>
@@ -270,6 +271,8 @@ test_build_media (void)
gint
main (gint argc, gchar **argv)
{
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", LUA_FACTORY_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", LUA_FACTORY_ID, TRUE);
g_setenv ("GRL_NET_MOCKED", LUA_FACTORY_DATA_PATH "config.ini", TRUE);
diff --git a/tests/lua-factory/test_lua_factory_source_errors.c
b/tests/lua-factory/test_lua_factory_source_errors.c
index f47ebbbb..7e71968d 100644
--- a/tests/lua-factory/test_lua_factory_source_errors.c
+++ b/tests/lua-factory/test_lua_factory_source_errors.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#include <string.h>
@@ -162,6 +163,8 @@ test_not_callback_simple (void)
gint
main (gint argc, gchar **argv)
{
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", LUA_FACTORY_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", LUA_FACTORY_ID, TRUE);
g_setenv ("GRL_NET_MOCKED", LUA_FACTORY_DATA_PATH "config.ini", TRUE);
diff --git a/tests/lua-factory/test_lua_factory_xml_parser.c b/tests/lua-factory/test_lua_factory_xml_parser.c
index 850bd5b9..fa468472 100644
--- a/tests/lua-factory/test_lua_factory_xml_parser.c
+++ b/tests/lua-factory/test_lua_factory_xml_parser.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#include <string.h>
@@ -127,6 +128,8 @@ test_xml_parser (void)
gint
main (gint argc, gchar **argv)
{
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", LUA_FACTORY_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", LUA_FACTORY_ID, TRUE);
g_setenv ("GRL_NET_MOCKED", LUA_FACTORY_DATA_PATH "config.ini", TRUE);
diff --git a/tests/spotify-cover/test_spotify_cover.c b/tests/spotify-cover/test_spotify_cover.c
index ef87eaef..dfb110e1 100644
--- a/tests/spotify-cover/test_spotify_cover.c
+++ b/tests/spotify-cover/test_spotify_cover.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#define SPOTIFY_ALBUMART_ID "grl-spotify-cover"
@@ -262,6 +263,8 @@ test_resolve_missing_key (void)
int
main(int argc, char **argv)
{
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", LUA_FACTORY_PLUGIN_PATH, TRUE);
g_setenv ("GRL_LUA_SOURCES_PATH", LUA_SOURCES_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", "grl-lua-factory", TRUE);
diff --git a/tests/steam-store/test_steam_store.c b/tests/steam-store/test_steam_store.c
index a295b0c2..c40bc598 100644
--- a/tests/steam-store/test_steam_store.c
+++ b/tests/steam-store/test_steam_store.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#include <stdio.h>
@@ -139,6 +140,8 @@ test_resolve_game_found (void)
int
main (int argc, char **argv)
{
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", LUA_FACTORY_PLUGIN_PATH, TRUE);
g_setenv ("GRL_LUA_SOURCES_PATH", LUA_SOURCES_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", "grl-lua-factory", TRUE);
diff --git a/tests/thetvdb/test_thetvdb_resolve_episodes.c b/tests/thetvdb/test_thetvdb_resolve_episodes.c
index 8ff302b6..73d7803a 100644
--- a/tests/thetvdb/test_thetvdb_resolve_episodes.c
+++ b/tests/thetvdb/test_thetvdb_resolve_episodes.c
@@ -21,6 +21,7 @@
*/
#include "test_thetvdb_utils.h"
+#include <locale.h>
#include <grilo.h>
static void
@@ -157,6 +158,8 @@ main (gint argc, gchar **argv)
{
gint result;
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", THETVDB_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", THETVDB_ID, TRUE);
g_setenv ("GRL_NET_MOCKED", THETVDB_PLUGIN_TEST_DATA_PATH "config.ini", TRUE);
diff --git a/tests/thetvdb/test_thetvdb_resolve_shows.c b/tests/thetvdb/test_thetvdb_resolve_shows.c
index aed56c57..d0749084 100644
--- a/tests/thetvdb/test_thetvdb_resolve_shows.c
+++ b/tests/thetvdb/test_thetvdb_resolve_shows.c
@@ -21,6 +21,7 @@
*/
#include "test_thetvdb_utils.h"
+#include <locale.h>
#include <grilo.h>
/* Returns whether it could find tvdb-id */
@@ -295,6 +296,8 @@ main (gint argc, gchar **argv)
{
gint result;
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", THETVDB_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", THETVDB_ID, TRUE);
g_setenv ("GRL_NET_MOCKED", THETVDB_PLUGIN_TEST_DATA_PATH "config.ini", TRUE);
diff --git a/tests/thetvdb/test_thetvdb_resolve_stress.c b/tests/thetvdb/test_thetvdb_resolve_stress.c
index 1840a609..31889923 100644
--- a/tests/thetvdb/test_thetvdb_resolve_stress.c
+++ b/tests/thetvdb/test_thetvdb_resolve_stress.c
@@ -21,6 +21,7 @@
*/
#include "test_thetvdb_utils.h"
+#include <locale.h>
#include <grilo.h>
static gint num_tests;
@@ -298,6 +299,8 @@ main (gint argc, gchar **argv)
{
gint result;
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", THETVDB_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", THETVDB_ID, TRUE);
g_setenv ("GRL_NET_MOCKED", THETVDB_PLUGIN_TEST_DATA_PATH "config.ini", TRUE);
diff --git a/tests/tmdb/test_tmdb_fast_resolution.c b/tests/tmdb/test_tmdb_fast_resolution.c
index d5b8573d..f46dcbdc 100644
--- a/tests/tmdb/test_tmdb_fast_resolution.c
+++ b/tests/tmdb/test_tmdb_fast_resolution.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#include "test_tmdb_utils.h"
#include <math.h>
@@ -98,6 +99,8 @@ main(int argc, char **argv)
{
gint result;
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", GRILO_PLUGINS_TESTS_TMDB_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", TMDB_PLUGIN_ID, TRUE);
diff --git a/tests/tmdb/test_tmdb_fast_resolution_by_id.c b/tests/tmdb/test_tmdb_fast_resolution_by_id.c
index 05d6734b..664c9ad5 100644
--- a/tests/tmdb/test_tmdb_fast_resolution_by_id.c
+++ b/tests/tmdb/test_tmdb_fast_resolution_by_id.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#include "test_tmdb_utils.h"
#include <math.h>
@@ -100,6 +101,8 @@ main(int argc, char **argv)
{
gint result;
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", GRILO_PLUGINS_TESTS_TMDB_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", TMDB_PLUGIN_ID, TRUE);
diff --git a/tests/tmdb/test_tmdb_full_resolution.c b/tests/tmdb/test_tmdb_full_resolution.c
index ea507812..cee0a8ea 100644
--- a/tests/tmdb/test_tmdb_full_resolution.c
+++ b/tests/tmdb/test_tmdb_full_resolution.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#include "test_tmdb_utils.h"
#include <math.h>
@@ -157,6 +158,8 @@ main(int argc, char **argv)
{
gint result;
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", GRILO_PLUGINS_TESTS_TMDB_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", TMDB_PLUGIN_ID, TRUE);
diff --git a/tests/tmdb/test_tmdb_missing_configuration.c b/tests/tmdb/test_tmdb_missing_configuration.c
index e069546e..1e3fb847 100644
--- a/tests/tmdb/test_tmdb_missing_configuration.c
+++ b/tests/tmdb/test_tmdb_missing_configuration.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#include "test_tmdb_utils.h"
#include <math.h>
@@ -69,6 +70,8 @@ main(int argc, char **argv)
{
gint result;
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", GRILO_PLUGINS_TESTS_TMDB_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", TMDB_PLUGIN_ID, TRUE);
diff --git a/tests/tmdb/test_tmdb_preconditions.c b/tests/tmdb/test_tmdb_preconditions.c
index f5ce72df..e6ed398c 100644
--- a/tests/tmdb/test_tmdb_preconditions.c
+++ b/tests/tmdb/test_tmdb_preconditions.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#include "test_tmdb_utils.h"
#include <math.h>
@@ -91,6 +92,8 @@ main(int argc, char **argv)
{
gint result;
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", GRILO_PLUGINS_TESTS_TMDB_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", TMDB_PLUGIN_ID, TRUE);
diff --git a/tests/vimeo/test_vimeo.c b/tests/vimeo/test_vimeo.c
index 5cf99c9e..0749338a 100644
--- a/tests/vimeo/test_vimeo.c
+++ b/tests/vimeo/test_vimeo.c
@@ -20,6 +20,7 @@
*
*/
+#include <locale.h>
#include <grilo.h>
#define VIMEO_ID "grl-vimeo"
@@ -233,6 +234,8 @@ main (int argc, char **argv)
{
gint result;
+ setlocale (LC_ALL, "");
+
g_setenv ("GRL_PLUGIN_PATH", VIMEO_PLUGIN_PATH, TRUE);
g_setenv ("GRL_PLUGIN_LIST", VIMEO_ID, TRUE);
g_setenv ("GRL_NET_MOCKED", VIMEO_DATA_PATH "network-data.ini", TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]