hooked/hooked-config/tests/parsing.rs

15 lines
456 B
Rust
Raw Permalink Normal View History

2022-10-28 10:23:05 +00:00
use std::path::PathBuf;
use {color_eyre::Result, hooked_config::Config};
2022-10-28 10:23:05 +00:00
use {insta::assert_debug_snapshot, test_case::test_case};
#[test_case("defaults" ; "defaults")]
2022-10-28 12:06:03 +00:00
#[test_case("with-hooks" ; "with-hooks")]
2022-10-28 10:23:05 +00:00
fn test_config_parsing(file_name: &str) -> Result<()> {
let file = PathBuf::from(format!("tests/parsing/{file_name}.toml"));
let config = Config::from_toml_file(file)?;
assert_debug_snapshot!(format!("{file_name}"), config);
Ok(())
}