<commit_before>#include <glib-object.h>
#include <telepathy-glib/connection-manager.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/defs.h>

static void
prepare (void)
{
  const gchar *abs_top_builddir = g_getenv ("abs_top_builddir");
  gchar *command[] = {
      g_strdup_printf ("%s/%s",
          abs_top_builddir,
          "examples/cm/no-protocols/telepathy-example-no-protocols"),
      NULL
  };
  gboolean ret;

  g_assert (abs_top_builddir != NULL);

  ret = g_spawn_async (NULL, command, NULL, 0, NULL, NULL, NULL, NULL);
  g_assert (ret);

  g_free (command[0]);
}

static void
connection_manager_got_info (TpConnectionManager *cm,
                             guint source,
                             GMainLoop *mainloop)
{
  g_message ("Emitted got-info (source=%d)", source);

  if (source > 0)
    g_main_loop_quit (mainloop);
}

gboolean
time_out (gpointer mainloop)
{
  g_error ("Timed out");
  g_assert_not_reached ();
  return FALSE;
}

int<commit_msg>Produce some output if we can't run the example CM<commit_after>#include <glib-object.h>
#include <telepathy-glib/connection-manager.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/defs.h>

static void
prepare (void)
{
  GError *error = NULL;
  const gchar *abs_top_builddir = g_getenv ("abs_top_builddir");
  gchar *command[] = {
      g_strdup_printf ("%s/%s",
          abs_top_builddir,
          "examples/cm/no-protocols/telepathy-example-no-protocols"),
      NULL
  };

  g_assert (abs_top_builddir != NULL);

  if (!g_spawn_async (NULL, command, NULL, 0, NULL, NULL, NULL, &error))
    {
      g_error ("g_spawn_async: %s", error->message);
    }

  g_free (command[0]);
}

static void
connection_manager_got_info (TpConnectionManager *cm,
                             guint source,
                             GMainLoop *mainloop)
{
  g_message ("Emitted got-info (source=%d)", source);

  if (source > 0)
    g_main_loop_quit (mainloop);
}

gboolean
time_out (gpointer mainloop)
{
  g_error ("Timed out");
  g_assert_not_reached ();
  return FALSE;
}

int
{'fraction_non_alphanumeric': 0.12953117448042534, 'fraction_numerical': 0.0028999516674722086, 'mean_word_length': 3.1566265060240966, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4137926', 'n_tokens_mistral': 759, 'n_tokens_neox': 740, 'n_words': 157}