1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#![allow(dead_code)]
#[macro_use]
extern crate lang_extension;
#[macro_use]
extern crate log;
pub mod property;
pub mod source;
pub mod manager;
pub mod facade;
#[cfg(test)]
pub mod tests {
use std::env::*;
use std::sync::Once;
static LOG_INIT: Once = Once::new();
pub fn init_log() {
LOG_INIT.call_once(||log4rs::init_file("log4rs.yml", Default::default()).unwrap());
}
#[test]
fn it_works() {
init_log();
assert_eq!(2 + 2, 4);
println!("current dir: {:?}", current_dir());
}
}