#![deny(missing_docs)]
#![deny(clippy::missing_docs_in_private_items)]
// SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net>
// SPDX-License-Identifier: BSD-2-Clause
//! Very basic tests, almost no actual functionality tested.

#![expect(clippy::panic_in_result_fn, reason = "integration test")]
#![expect(clippy::tests_outside_test_module, reason = "integration test")]

use anyhow::{Result, bail};
use indexmap::IndexMap;
use log::debug;

mod util;

/// Make sure [`roundlet::features`] reports at least "roundlet".
#[test]
fn roundlet() -> Result<()> {
    util::setup_test_logging();
    let features: IndexMap<_, _> = roundlet::features().collect();
    debug!("Got features {features:?}");

    let Some(value) = features.get("roundlet") else {
        bail!("No 'roundlet' in {features:?}");
    };
    assert_eq!(*value, env!("CARGO_PKG_VERSION"));
    Ok(())
}
