Skip to main content

cli_battery_pack/
lib.rs

1#![doc = include_str!(concat!(env!("OUT_DIR"), "/docs.md"))]
2
3/// Validate that the consumer's dependencies match this battery pack's specs.
4///
5/// Call from the consumer's `build.rs`:
6/// ```rust,ignore
7/// fn main() {
8///     cli_battery_pack::validate();
9/// }
10/// ```
11pub fn validate() {
12    battery_pack::validate(include_str!("../Cargo.toml"));
13}
14
15#[cfg(test)]
16mod tests {
17    #[test]
18    fn validate_templates() {
19        battery_pack::testing::validate_templates(env!("CARGO_MANIFEST_DIR")).unwrap();
20    }
21}