Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/holger

server/lib/tests/a_build_without_front_compiles.rs

//! ★ **A build without `front` compiles** (guard after OX-SALE 841a9bca, 2026-10-28).
//!
//! `front` is a Build Thing choice (`tests/the_default_server_serves_no_page.rs`): the
//! default build, the estate front (`holger-estate-front`, server-lib `estate`) and
//! `holger-cli` all build this crate WITHOUT it. A helper added between
//! `#[cfg(feature = "front")]` and the function it gated took that attribute, so the gated
//! function was compiled into every build and named `holger_front`, which only `front`
//! links: E0433 in every build but the one the lane tested. This target is built only
//! without `front`, so `cargo test` at the default features (the `test` step of
//! `cargo xtask ci`) is red the moment front-only code leaks out of its feature.
#![cfg(not(feature = "front"))]

/// Compiling this file at all is the proof: it links the library built without `front`.
#[test]
fn the_library_builds_without_the_front_page() {
    let settings =
        holger_server_lib::read_ron_config(std::path::Path::new("/nonexistent/holger.ron"));
    assert!(
        settings.is_err(),
        "a config that is not there is refused, by a library built with no front page"
    );
}