Add example config tests

This commit is contained in:
Jan Trefil 2023-10-14 10:46:36 +02:00
parent e46d14bb14
commit 1c148cf3a3
2 changed files with 17 additions and 0 deletions

View file

@ -119,4 +119,10 @@ mod tests {
assert_eq!(parsed_ip, Ipv6Addr::from_str("::1").unwrap());
}
#[test]
fn example_parses() {
let config = include_str!("../../example/client.toml");
toml::from_str::<Config>(config).unwrap();
}
}

View file

@ -1226,3 +1226,14 @@ impl Into<Key> for SwitchKey {
}
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn example_parses() {
let config = include_str!("../../example/server.toml");
toml::from_str::<Config>(config).unwrap();
}
}