eleven / ocho Public

Clone
git clone https://amadan.net/eleven/ocho

Plain git — no account needed to clone.

Download

Download this file

1package bot
2
3import "testing"
4
5// TestScrubSelfNotes pins the output scrub: the "[note to self: …]" history
6// annotation must never reach a posted reply, however the model weaves it in.
7func TestScrubSelfNotes(t *testing.T) {
8 cases := []struct{ in, want string }{
9 {"Tap to see your issues:\n[note to self: this reply attached 1 button(s) via tool calls]",
10 "Tap to see your issues:"},
11 {"[note to self: this reply attached 2 button(s) via tool calls]", ""},
12 {"Before [note to self: x] after", "Before after"},
13 {"No notes here.", "No notes here."},
14 {"A [bracket] that is not a note survives.", "A [bracket] that is not a note survives."},
15 }
16 for _, c := range cases {
17 if got := scrubSelfNotes(c.in); got != c.want {
18 t.Errorf("scrubSelfNotes(%q) = %q, want %q", c.in, got, c.want)
19 }
20 }
21}
22