[gnome-builder] tests: add content check in fuzzy test
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] tests: add content check in fuzzy test
- Date: Sun, 15 Jan 2017 14:04:22 +0000 (UTC)
commit c58da1dff184f737665ec4c1fedb0e74c4a5888c
Author: Sebastien Lafargue <slafargue gnome org>
Date: Sun Jan 15 15:03:25 2017 +0100
tests: add content check in fuzzy test
tests/test-fuzzy.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/tests/test-fuzzy.c b/tests/test-fuzzy.c
index 1e21884..2414ecc 100644
--- a/tests/test-fuzzy.c
+++ b/tests/test-fuzzy.c
@@ -25,7 +25,12 @@ main (int argc,
fuzzy = fuzzy_new (FALSE);
g_print ("Loading contents\n");
- g_file_get_contents (argv [1], &contents, &len, NULL);
+ if (!g_file_get_contents (argv [1], &contents, &len, NULL))
+ {
+ g_critical ("Can't l;oad contents, aborting.");
+ return EXIT_FAILURE;
+ }
+
g_print ("Loaded\n");
ide_line_reader_init (&reader, contents, len);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]