Reset master to testing content
This commit is contained in:
1 parent
0f2587b719
commit
42afa2a56c
1483 files changed
+145308
-938069
No files matched your search
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2026 Storm Dragon
|
||||
// Authors: Storm Dragon, Angus Kola
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
package input
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestReadAllBindings(t *testing.T) {
|
||||
for _, browse := range []bool{false, true} {
|
||||
for _, layout := range []KeyboardLayout{DesktopKeyboardLayout, LaptopKeyboardLayout} {
|
||||
bindings := DefaultCommandBindings(layout)
|
||||
if browse {
|
||||
bindings = BrowseCommandBindings(layout)
|
||||
}
|
||||
symbol := uint32(0xffab)
|
||||
modifier := layout == LaptopKeyboardLayout
|
||||
if modifier {
|
||||
symbol = ';'
|
||||
}
|
||||
if got := bindings[CommandChord{Symbol: symbol, CthulhuModifier: modifier}]; got != ReadAll {
|
||||
t.Fatalf("layout %d browse %v: %q", layout, browse, got)
|
||||
}
|
||||
if bindings[CommandChord{Symbol: symbol, Modifiers: controlModifier, CthulhuModifier: modifier}] != "" {
|
||||
t.Fatal("read all intercepted modified application shortcut")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user