[gnome-builder/wip/libide] libide: allow specifying a file in source test tool
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: allow specifying a file in source test tool
- Date: Fri, 27 Feb 2015 01:15:21 +0000 (UTC)
commit f4bcd9dd22de453083d2d5359cd6a13e4c0d1819
Author: Christian Hergert <christian hergert me>
Date: Thu Feb 26 16:38:18 2015 -0800
libide: allow specifying a file in source test tool
tests/test-ide-source-view.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/tests/test-ide-source-view.c b/tests/test-ide-source-view.c
index afcfca2..c25d6c9 100644
--- a/tests/test-ide-source-view.c
+++ b/tests/test-ide-source-view.c
@@ -19,6 +19,7 @@
#include <ide.h>
static IdeContext *gContext;
+static const gchar *gFileName = "test.c";
static void
load_cb (GObject *object,
@@ -75,7 +76,7 @@ context_cb (GObject *object,
}
project = ide_context_get_project (context);
- file = ide_project_get_file_for_path (project, "test.c");
+ file = ide_project_get_file_for_path (project, gFileName);
buffer_manager = ide_context_get_buffer_manager (context);
ide_buffer_manager_load_file_async (buffer_manager, file, FALSE,
@@ -105,6 +106,9 @@ main (gint argc,
gtk_init (&argc, &argv);
+ if (argc > 1)
+ gFileName = argv [1];
+
cancellable = g_cancellable_new ();
window = g_object_new (GTK_TYPE_WINDOW,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]