Ely Office: six offline-first desktop apps in Rust and GPUI
ElyDoc, ElyTable, ElyShow (LibreOfficeKit), ElyPDF (MuPDF), ElyTree (Git), ElyMark (Milkdown and CodeMirror in CEF). ElyMail and ElyAgent follow.
This commit is contained in:
817 files changed
+143101
No files matched your search
@@ -0,0 +1,20 @@
|
||||
use ely_platform::{AppId, logging};
|
||||
|
||||
#[test]
|
||||
fn log_lines_reach_the_app_file_and_a_second_init_fails() {
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
|
||||
logging::init_in(AppId::Doc, dir.path()).unwrap();
|
||||
log::info!("hello from the test");
|
||||
log::logger().flush();
|
||||
|
||||
let text = std::fs::read_to_string(dir.path().join("ely.log")).unwrap();
|
||||
assert!(text.contains("ElyDoc 0.1.0 started"), "{text}");
|
||||
assert!(text.contains("hello from the test"), "{text}");
|
||||
|
||||
let error = logging::init_in(AppId::Mail, dir.path()).unwrap_err();
|
||||
assert!(
|
||||
format!("{error:#}").contains("a logger is already set"),
|
||||
"{error:#}"
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user