()
| 307 | |
| 308 | #[test] |
| 309 | fn lift_memory_prefers_memory_container() { |
| 310 | // With a :::memory container, its body is authoritative and the |
| 311 | // surrounding prose is ignored (single authoring site). |
| 312 | let body = "\ |
| 313 | ignored surrounding prose |
| 314 | |
| 315 | :::memory{} |
| 316 | The constraint text that is authoritative. |
| 317 | ::: |
| 318 | |
| 319 | more ignored prose"; |
| 320 | let node = lift_memory(&fm(), body).unwrap(); |
| 321 | assert_eq!(node.text, "The constraint text that is authoritative."); |
| 322 | assert!(!node.text.contains("ignored")); |
| 323 | |
| 324 | // Without a container, the whole trimmed body is the text. |
| 325 | let plain = lift_memory(&fm(), " just a plain body ").unwrap(); |
| 326 | assert_eq!(plain.text, "just a plain body"); |
| 327 | } |
| 328 | |
| 329 | #[test] |
| 330 | fn lift_memory_accepts_kind_alias_and_defaults_status() { |
nothing calls this directly
no test coverage detected