Codebase list empathy / ubuntu/2.26.2-1ubuntu1 tests / check-empathy-utils.c
ubuntu/2.26.2-1ubuntu1

Tree @ubuntu/2.26.2-1ubuntu1 (Download .tar.gz)

check-empathy-utils.c @ubuntu/2.26.2-1ubuntu1raw · history · blame

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include <check.h>
#include "check-helpers.h"
#include "check-libempathy.h"

#include <libempathy/empathy-utils.h>

START_TEST (test_empathy_substring)
{
  gchar *tmp;

  tmp = empathy_substring ("empathy", 2, 6);
  fail_if (tmp == NULL);
  fail_if (strcmp (tmp, "path") != 0);

  g_free (tmp);
}
END_TEST

TCase *
make_empathy_utils_tcase (void)
{
    TCase *tc = tcase_create ("empathy-utils");
    tcase_add_test (tc, test_empathy_substring);
    return tc;
}