Some echo tests added.

This commit is contained in:
Storm Dragon committed 2026-10-27 00:40:49 -04:00
1 parent 8a32895457
commit eb5b2038d6
38 files changed
+1739 -31

No files matched your search

+2 -2
View File
@@ -34,7 +34,7 @@ func TestLearnModePresentsKeyCommandsWithoutExecutingThem(t *testing.T) {
braille := &learnBrailleRecorder{}
presenter := &learnModePresenter{ctx: context.Background(), logger: slog.New(slog.DiscardHandler), speech: speech, braille: braille, live: live}
presenter.handle(input.CommandEvent{Command: input.ToggleLearnMode, LearnModeStarted: true})
if !presenter.active || len(speech.texts) != 2 || !strings.Contains(speech.texts[1], "Cthulhu F1") || len(braille.texts) != 1 {
if !presenter.active || len(speech.texts) != 2 || !strings.Contains(speech.texts[1], "Escape or Cthulhu H") || strings.Contains(speech.texts[1], "Cthulhu F1") || len(braille.texts) != 1 {
t.Fatalf("start speech=%q braille=%q", speech.texts, braille.texts)
}
presenter.handle(input.CommandEvent{Command: input.LearnKey, Chord: input.CommandChord{Symbol: 'q', CthulhuModifier: true}, KeyName: "q", Timestamp: 100})
@@ -66,7 +66,7 @@ func TestLearnShortcutListUsesActiveBindings(t *testing.T) {
foundPreferences := false
for _, row := range list.Rows {
if row.Label == "Enter or exit learn mode." {
foundLearn = strings.Contains(row.Keys, "Cthulhu+h") && strings.Contains(row.Keys, "Cthulhu+F1")
foundLearn = row.Keys == "Cthulhu+h"
}
if row.Label == "Open Cthulhu preferences." {
foundPreferences = true