~ubuntu-branches/ubuntu/trusty/fcitx/trusty

« back to all changes in this revision

Viewing changes to test/teststring.c

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2012-05-12 01:37:19 UTC
  • mfrom: (10.1.19 sid)
  • Revision ID: package-import@ubuntu.com-20120512013719-qivlvp3gxi4l7z9j
Tags: 1:4.2.3-2
debian/patches/0004-upstream-post-release-changes.patch:
Add upstream fix for testpinyin, to avoid its segfaults.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <assert.h>
1
2
#include "fcitx-utils/utils.h"
2
 
#include "assert.h"
3
3
 
4
4
int main()
5
5
{
6
6
    char *test = "a,b,c,d";
7
 
    
 
7
 
8
8
    UT_array* list = fcitx_utils_split_string(test, ',');
9
9
    assert(utarray_len(list) == 4);
10
10
    char* join = fcitx_utils_join_string_list(list, ',');
11
11
    assert(strcmp(join, test) == 0);
12
12
    free(join);
13
13
    fcitx_utils_free_string_list(list);
14
 
    
 
14
 
15
15
    return 0;
16
16
}
 
 
b'\\ No newline at end of file'