proto, memoryd: no line of an entry may start with §, and headers are exact
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
@@ -59,3 +59,21 @@ fn a_time_is_shown_to_the_minute() {
|
||||
"2026-09-24T20:14Z"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_noted_header_with_an_unknown_last_part_is_not_a_header() {
|
||||
let text = "§ noted 2026-09-24T20:14Z in session mm-s1 · private · untrusted\nfirst\n§ noted 2026-09-24T20:15Z in session mm-s2 · private · trusted\nsecond\n";
|
||||
let notes = parse(text);
|
||||
assert_eq!(notes.len(), 1);
|
||||
assert_eq!(
|
||||
notes[0].kind,
|
||||
Kind::Noted {
|
||||
class: DataClass::Private,
|
||||
untrusted: true,
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
notes[0].text,
|
||||
"first\n§ noted 2026-09-24T20:15Z in session mm-s2 · private · trusted\nsecond"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user