keys support case

This commit is contained in:
Bel LaPointe
2023-03-24 13:30:46 -06:00
parent e5a668b691
commit 7b7486cc93
3 changed files with 102 additions and 40 deletions

View File

@@ -3,6 +3,7 @@ package key
import "testing"
func TestFromChar(t *testing.T) {
caseSensitive = false
if got := FromChar('1'); got != N1 {
t.Error(got)
}
@@ -21,4 +22,11 @@ func TestFromChar(t *testing.T) {
if got := ToChar(-1); got != '?' {
t.Error(got)
}
caseSensitive = true
if got := FromChar('a'); got != A {
t.Error(got)
}
if got := FromChar('A'); got != AUpper {
t.Error(got)
}
}