[gnome-builder] foundry: add missing ide_test_manager_get_pty()



commit 0670d7cf81591ceebf025dcc00b3363ea816a04f
Author: Christian Hergert <chergert redhat com>
Date:   Wed Feb 20 17:18:09 2019 -0800

    foundry: add missing ide_test_manager_get_pty()
    
    This is a simple getter for the PTY to use when running unit tests.

 src/libide/foundry/ide-test-manager.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
---
diff --git a/src/libide/foundry/ide-test-manager.c b/src/libide/foundry/ide-test-manager.c
index c08fc7bf4..1d409758d 100644
--- a/src/libide/foundry/ide-test-manager.c
+++ b/src/libide/foundry/ide-test-manager.c
@@ -1036,3 +1036,24 @@ ide_test_manager_ensure_loaded_finish (IdeTestManager  *self,
 
   return ide_task_propagate_boolean (IDE_TASK (result), error);
 }
+
+/**
+ * ide_test_manager_get_pty:
+ * @self: a #IdeTestManager
+ *
+ * Gets the #VtePty to use for running unit tests.
+ *
+ * Returns: (transfer none): a #VtePty
+ *
+ * Since: 3.32
+ */
+VtePty *
+ide_test_manager_get_pty (IdeTestManager *self)
+{
+  g_return_val_if_fail (IDE_IS_TEST_MANAGER (self), NULL);
+
+  if (self->pty == NULL)
+    self->pty = vte_pty_new_sync (VTE_PTY_DEFAULT, NULL, NULL);
+
+  return self->pty;
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]