Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/synapse/blob/main/crates/synapse-crumb/tests/repo_root.rs # synapse A component of the AienOS ecosystem. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `synapse / crates / synapse-crumb / tests / repo_root.rs` 20 lines ยท 830 bytes Raw Blame History 1 //! The repository's own root `.crumb` is RFC-0001 JSON (D1), so the reference `crumb.c` 2 //! reads it too (ADR 0004 section 1.2: `crumb.c` cannot read the D3 dialect). 3 4 use std::fs; 5 use std::path::PathBuf; 6 use synapse_crumb::{parse_crumb, Dialect, DirectoryCrumb}; 7 8 #[test] 9 fn repository_root_crumb_is_rfc0001() { 10 let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../.crumb"); 11 let bytes = fs::read(&path).expect("repository root .crumb exists"); 12 let crumb = parse_crumb(&bytes).expect("repository root .crumb parses"); 13 assert_eq!(crumb.dialect(), Dialect::Rfc0001Json); 14 let DirectoryCrumb::Rfc0001(c) = crumb else { 15 panic!("repository root .crumb is not D1"); 16 }; 17 assert_eq!(c.name, "synapse"); 18 assert_eq!(c.layer.as_deref(), Some("root")); 19 assert!(!c.purpose.is_empty()); 20 }