mirror of
https://github.com/OMGeeky/backup_config.git
synced 2025-12-27 06:29:28 +01:00
22 lines
584 B
Rust
22 lines
584 B
Rust
#[cfg(test)]
|
|
mod test {
|
|
use twba_backup_config::prelude::*;
|
|
|
|
#[test]
|
|
fn test_config() {
|
|
let conf = Conf::builder()
|
|
.file("./test_data/simple.toml")
|
|
.file("./tests/test_data/simple.toml")
|
|
.load()
|
|
.unwrap();
|
|
assert_eq!(conf.db_url, "sqlite://data.db?mode=rwc");
|
|
}
|
|
|
|
#[test]
|
|
fn print_template_toml() {
|
|
use confique::toml::{template, FormatOptions};
|
|
let template_out = template::<Conf>(FormatOptions::default());
|
|
println!("template_out: \n```\n{}\n```", template_out);
|
|
}
|
|
}
|