Files
cthulhu/internal/input/speech_history_test.go

21 lines
776 B
Go

// Copyright (c) 2026 Storm Dragon
// Authors: Storm Dragon, Angus Kola
// SPDX-License-Identifier: GPL-3.0-or-later
package input
import "testing"
func TestSpeechHistoryBindingsInBothLayouts(t *testing.T) {
for _, layout := range []KeyboardLayout{DesktopKeyboardLayout, LaptopKeyboardLayout} {
for _, bindings := range []CommandBindings{DefaultCommandBindings(layout), BrowseCommandBindings(layout)} {
if got := bindings[CommandChord{Symbol: 'h', Modifiers: controlModifier, CthulhuModifier: true}]; got != ShowSpeechHistory {
t.Fatalf("layout %d history = %q", layout, got)
}
if got := bindings[CommandChord{Symbol: 'd', Modifiers: 1, CthulhuModifier: true}]; got != ToggleSpeechMonitor {
t.Fatalf("layout %d monitor = %q", layout, got)
}
}
}
}