()
| 285 | |
| 286 | #[test] |
| 287 | fn lift_memory_prefers_memory_container() { |
| 288 | // With a :::memory container, its body is authoritative and the |
| 289 | // surrounding prose is ignored (single authoring site). |
| 290 | let body = "\ |
| 291 | ignored surrounding prose |
| 292 | |
| 293 | :::memory{} |
| 294 | The constraint text that is authoritative. |
| 295 | ::: |
| 296 | |
| 297 | more ignored prose"; |
| 298 | let node = lift_memory(&fm(), body).unwrap(); |
| 299 | assert_eq!(node.text, "The constraint text that is authoritative."); |
| 300 | assert!(!node.text.contains("ignored")); |
| 301 | |
| 302 | // Without a container, the whole trimmed body is the text. |
| 303 | let plain = lift_memory(&fm(), " just a plain body ").unwrap(); |
| 304 | assert_eq!(plain.text, "just a plain body"); |
| 305 | } |
| 306 | |
| 307 | #[test] |
| 308 | fn lift_memory_accepts_kind_alias_and_defaults_status() { |
nothing calls this directly
no test coverage detected