Files
Claude dd788e26a3 Add the last callers, feedback, user details, a line about oneself, expert menus
- Last callers (L, and a callers menu action): each login is recorded
  (calls: the newest 10000 kept); GET /api/v1/callers.
- Feedback to the sysop (K, a feedback action): mail any caller may
  send, whatever their level allows.
- The user list picks a user: their details (a sysop sees their access
  and files too), and mail to them from there.
- A line about oneself, on the profile (Y; - clears it) and PATCH /me's
  about, shown with one's details.
- Expert menus (the expert setting, X on a text terminal's profile): a
  menu is its prompt, "Command (? for the menu): ", and ? shows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-12 17:33:55 +00:00

30 lines
771 B
Go

package server
import (
"strings"
"testing"
)
// TestExpertMenus: an expert's menu is its prompt; ? shows the rest.
func TestExpertMenus(t *testing.T) {
e := start(t, nil, &Listener{Name: "modem", Kind: "raw", Address: "modem.sock", ANSI: "no"})
d := login(e, "alice", "alicepass1")
d.send("P")
d.expect("Menus: in full")
d.expect("[X] Expert menus on/off")
d.send("X")
d.expect("Menus: expert (the prompt alone)")
d.send("Q")
d.expect("Command (? for the menu): ")
if strings.Contains(string(d.got), "[M] Message areas") {
t.Errorf("an expert got the menu: %q", d.got)
}
d.send("?")
d.expect("[M] Message areas")
d.expect("[L] Last callers")
d.expect("Command (? for the menu): ")
d.send("L")
d.expect("Last callers")
d.expect("alice")
}