mirror of
https://github.com/rustic-rs/rustic.git
synced 2025-10-26 11:18:51 +00:00
16 lines
418 B
Rust
16 lines
418 B
Rust
//! Configuration file tests
|
|
|
|
use anyhow::Result;
|
|
use rstest::*;
|
|
use rustic_rs::RusticConfig;
|
|
use std::{fs, path::PathBuf};
|
|
|
|
/// Ensure all `configs` parse as a valid config files
|
|
#[rstest]
|
|
fn test_parse_rustic_configs_is_ok(#[files("config/*.toml")] config_path: PathBuf) -> Result<()> {
|
|
let toml_string = fs::read_to_string(config_path)?;
|
|
let _ = toml::from_str::<RusticConfig>(&toml_string)?;
|
|
|
|
Ok(())
|
|
}
|