test-unichar.c revision 5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294Timo Sirainen/* Copyright (c) 2007-2013 Dovecot authors, see the included COPYING file */
86763e4c68313df83606e1060fc1795280590677Timo Sirainen static const char *overlong_utf8 = "\xf8\x80\x95\x81\xa1";
86763e4c68313df83606e1060fc1795280590677Timo Sirainen test_assert(uni_utf8_str_is_valid(str_c(str)));
86763e4c68313df83606e1060fc1795280590677Timo Sirainen test_assert(uni_utf8_get_char(str_c(str), &chr2) > 0);
86763e4c68313df83606e1060fc1795280590677Timo Sirainen test_assert(!uni_utf8_str_is_valid(overlong_utf8));