use std::path::Path;

use crate::{lint::tariff, test, Version};

/// Each `test*.json` file in the `test_data/v211/lint` directories results in a test run.
#[test_each::file(
    glob = "ocpi-tariffs/test_data/v211/lint/*/test*.json",
    name(segments = 2)
)]
fn should_lint_tariff(test_json: &str, path: &Path) {
    test::setup();
    tariff::test::run_lint(test_json, path, Version::V211);
}
