- remove current_block logic from dc_chat.rs with the "OK_TO_CONTINUE"

pattern -- re-indentation will come after this commit with a pure application of "cargo fmt"
- bring back comment from C code
- make some path helpers return bool
This commit is contained in:
holger krekel
2019-07-25 17:42:28 +02:00
parent 9d87f2f10b
commit 9a9b49f8f0
4 changed files with 75 additions and 122 deletions

View File

@@ -123,21 +123,15 @@ unsafe fn stress_functions(context: &Context) {
context.get_blobdir(),
b"foobar\x00" as *const u8 as *const libc::c_char,
);
assert_ne!(0, dc_is_blobdir_path(context, abs_path));
assert_ne!(
0,
dc_is_blobdir_path(
context,
b"$BLOBDIR/fofo\x00" as *const u8 as *const libc::c_char,
)
);
assert_eq!(
0,
dc_is_blobdir_path(
context,
b"/BLOBDIR/fofo\x00" as *const u8 as *const libc::c_char,
)
);
assert!(dc_is_blobdir_path(context, abs_path));
assert!(dc_is_blobdir_path(
context,
b"$BLOBDIR/fofo\x00" as *const u8 as *const libc::c_char,
));
assert!(!dc_is_blobdir_path(
context,
b"/BLOBDIR/fofo\x00" as *const u8 as *const libc::c_char,
));
assert_ne!(0, dc_file_exist(context, abs_path));
free(abs_path as *mut libc::c_void);
assert_ne!(