mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
test: move tests for dc_utf8_strlen()
This commit is contained in:
@@ -1882,4 +1882,18 @@ mod tests {
|
||||
free(buf as *mut libc::c_void);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_dc_utf8_strlen() {
|
||||
unsafe {
|
||||
assert_eq!(
|
||||
dc_utf8_strlen(b"c\x00" as *const u8 as *const libc::c_char),
|
||||
1
|
||||
);
|
||||
assert_eq!(
|
||||
dc_utf8_strlen(b"\xc3\xa4\x00" as *const u8 as *const libc::c_char),
|
||||
1
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user