mod common;
mod golden;

use bone_jig::RunStatus;
use common::{find_artifact, manifest_path, run_library_scenario};
use golden::check_golden;

#[test]
fn cut_extrude_carves_a_pocket_on_a_face() {
    let dir = match tempfile::tempdir() {
        Ok(d) => d,
        Err(e) => panic!("tempdir: {e}"),
    };
    let result = run_library_scenario("parity_cut_extrude_hole.ron", dir.path());
    assert_eq!(result.status, RunStatus::Passed, "result: {result:?}");
    let snapshot = find_artifact(dir.path(), "_cut-extrude-hole.png");
    check_golden(
        "cut-extrude-hole",
        &snapshot,
        &manifest_path("tests/goldens/cut_extrude_hole.png"),
        "BONE_UPDATE_CUT_HOLE",
    );
}
