keys support case
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user