mirror of
https://github.com/simon987/libscan.git
synced 2025-12-14 06:59:02 +00:00
Limited support for UTF16
This commit is contained in:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user