aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check-empathy-utils.c
blob: faf2610581e2d6b25f89fa8ca2ec0626ee1e0c58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#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;
}