Verification
Evidence in repository:
- Integration tests cover fixture-based round-trip behavior across supported document kinds.
- Unknown syntax preservation tested explicitly.
kiutils-inspectJSON/text contract smoke tests present.
Test evidence snippet
#![allow(unused)]
fn main() {
fn pcb_fixture_roundtrip_lossless_and_unknown() {
let src_path = fixture("sample.kicad_pcb");
let src = fs::read_to_string(&src_path).expect("read fixture");
let doc = PcbFile::read(&src_path).expect("parse");
assert_eq!(doc.ast().unknown_nodes.len(), 1);
let out = tmp_file("pcb", "kicad_pcb");
doc.write(&out).expect("write");
let got = fs::read_to_string(&out).expect("read out");
assert_eq!(got, src);
let _ = fs::remove_file(out);
}
}
Local gate
cargo fmt --all
cargo test
cargo clippy --all-targets --all-features -- -D warnings
mdbook build docs