diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/dump_playlist.c | 7 | ||||
-rw-r--r-- | test/read_tags.c | 8 | ||||
-rw-r--r-- | test/run_decoder.c | 8 | ||||
-rw-r--r-- | test/run_input.c | 8 |
4 files changed, 27 insertions, 4 deletions
diff --git a/test/dump_playlist.c b/test/dump_playlist.c index af8a3a512..fba9498a7 100644 --- a/test/dump_playlist.c +++ b/test/dump_playlist.c @@ -74,7 +74,12 @@ int main(int argc, char **argv) return 1; } - input_stream_global_init(); + if (!input_stream_global_init(&error)) { + g_warning("%s", error->message); + g_error_free(error); + return 2; + } + playlist_list_global_init(); /* open the playlist */ diff --git a/test/read_tags.c b/test/read_tags.c index 4a4829824..647f7eacf 100644 --- a/test/read_tags.c +++ b/test/read_tags.c @@ -129,6 +129,7 @@ print_tag(const struct tag *tag) int main(int argc, char **argv) { + GError *error = NULL; const char *decoder_name, *path; const struct decoder_plugin *plugin; struct tag *tag; @@ -147,7 +148,12 @@ int main(int argc, char **argv) decoder_name = argv[1]; path = argv[2]; - input_stream_global_init(); + if (!input_stream_global_init(&error)) { + g_warning("%s", error->message); + g_error_free(error); + return 2; + } + decoder_plugin_init_all(); plugin = decoder_plugin_from_name(decoder_name); diff --git a/test/run_decoder.c b/test/run_decoder.c index ec6ef9f8a..dd1ecdb67 100644 --- a/test/run_decoder.c +++ b/test/run_decoder.c @@ -138,6 +138,7 @@ decoder_tag(G_GNUC_UNUSED struct decoder *decoder, int main(int argc, char **argv) { + GError *error = NULL; bool ret; const char *decoder_name; struct decoder decoder; @@ -152,7 +153,12 @@ int main(int argc, char **argv) g_log_set_default_handler(my_log_func, NULL); - input_stream_global_init(); + if (!input_stream_global_init(&error)) { + g_warning("%s", error->message); + g_error_free(error); + return 2; + } + decoder_plugin_init_all(); decoder.plugin = decoder_plugin_from_name(decoder_name); diff --git a/test/run_input.c b/test/run_input.c index 6aba41e8c..88202063f 100644 --- a/test/run_input.c +++ b/test/run_input.c @@ -41,6 +41,7 @@ my_log_func(const gchar *log_domain, G_GNUC_UNUSED GLogLevelFlags log_level, int main(int argc, char **argv) { struct input_stream is; + GError *error = NULL; bool success; char buffer[4096]; size_t num_read; @@ -60,7 +61,12 @@ int main(int argc, char **argv) tag_pool_init(); config_global_init(); - input_stream_global_init(); + + if (!input_stream_global_init(&error)) { + g_warning("%s", error->message); + g_error_free(error); + return 2; + } /* open the stream and wait until it becomes ready */ |