ontology-docs 0.2.0

A standalone, searchable Ontology documentation and agent-skills demo.
use serde_json::Value;
use std::process::Command;
#[test]
fn embedded_demo_discovers_queries_images_and_skills_without_runtime_files() {
    let exe = env!("CARGO_BIN_EXE_ontology-docs");
    let dir = tempfile::tempdir().unwrap();
    for args in [
        &[][..],
        &["search", "encryption"][..],
        &["images"][..],
        &["skills", "list"][..],
    ] {
        let result = Command::new(exe)
            .args(args)
            .current_dir(dir.path())
            .output()
            .unwrap();
        assert!(result.status.success());
        assert!(result.stderr.is_empty());
        let value: Value = serde_json::from_slice(&result.stdout).unwrap();
        assert_eq!(value["ok"], true);
    }
    let output = dir.path().join("export");
    let result = Command::new(exe)
        .args([
            "skills",
            "export",
            "ontology-authoring",
            "--output",
            output.to_str().unwrap(),
        ])
        .output()
        .unwrap();
    assert!(result.status.success());
    assert!(output.join("ontology-authoring/SKILL.md").is_file());
}