1
0
mirror of https://github.com/mum4k/termdash.git synced 2025-04-28 13:48:51 +08:00

Make mouse event test case clearer

This commit is contained in:
kvnxiao 2020-03-01 14:23:53 -05:00
parent b420a29b30
commit 95719be9f6

View File

@ -133,7 +133,15 @@ func TestMouseButtons(t *testing.T) {
t.Fatalf("toTermdashEvents => got %d events, want %d", got, want)
}
// Events that may exist for the terminal implementation but are not valid for termdash will be nil
switch count := len(tc.want); count {
case 0:
// Events that may exist for the terminal implementation but are not supported by termdash will be nil
return
case 1:
// Proceed with test
default:
t.Fatalf("toTermdashEvents test case specified %d expected events, only one is supported", count)
}
if len(tc.want) == 0 {
return
}