Fix unit tests

This commit is contained in:
Junegunn Choi 2024-02-19 12:39:04 +09:00
parent 17da165cfe
commit ca747a2b54
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ func TestReadFromCommand(t *testing.T) {
}
// Normal command
reader.fin(reader.readFromCommand(`echo abc&&echo def`))
reader.fin(reader.readFromCommand(`echo abc&&echo def`, nil))
if len(strs) != 2 || strs[0] != "abc" || strs[1] != "def" {
t.Errorf("%s", strs)
}
@ -47,7 +47,7 @@ func TestReadFromCommand(t *testing.T) {
reader.startEventPoller()
// Failing command
reader.fin(reader.readFromCommand(`no-such-command`))
reader.fin(reader.readFromCommand(`no-such-command`, nil))
strs = []string{}
if len(strs) > 0 {
t.Errorf("%s", strs)