Fix parse error of actions with arguments

This commit is contained in:
Junegunn Choi
2022-12-20 23:24:49 +09:00
parent 4b055bf260
commit def011c029
2 changed files with 11 additions and 1 deletions

View File

@@ -489,3 +489,13 @@ func TestParseSingleActionList(t *testing.T) {
t.Errorf("Invalid action parsed: %v", actions[3])
}
}
func TestParseSingleActionListError(t *testing.T) {
err := ""
parseSingleActionList("change-query(foobar)baz", func(e string) {
err = e
})
if len(err) == 0 {
t.Errorf("Failed to detect error")
}
}