Limited support for UTF16

This commit is contained in:
2020-08-25 13:15:10 -04:00
parent eaedb31f0b
commit 33f5fb8e2c
3 changed files with 38 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ TEST(Text, MemUtf8_1) {
parse_text(&text_500_ctx, &f, &doc);
ASSERT_EQ(strlen(get_meta(&doc, MetaContent)->str_val), 1);
ASSERT_EQ(get_meta(&doc, MetaContent), nullptr);
cleanup(&doc, &f);
}
@@ -114,6 +114,18 @@ TEST(Text, MemWhitespace) {
cleanup(&doc, &f);
}
TEST(Text, Utf16LE) {
vfile_t f;
document_t doc;
load_doc_file("libscan-test-files/test_files/text/pain_is_beauty.log", &f, &doc);
parse_text(&text_500_ctx, &f, &doc);
ASSERT_GE(strlen(get_meta(&doc, MetaContent)->str_val), 200);
cleanup(&doc, &f);
}
TEST(Text, MemNoise) {
char content[600];