scf_core/
lib.rs

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