fix panic in fs_reader

This commit is contained in:
textaligncenter committed 2024-08-03 19:08:04 +00:00
1 parent d407abb50f
commit d8ea178e69
3 files changed
+15

No files matched your search

+5
View File
@@ -34,6 +34,11 @@ func TestCommandReaderInvalid(t *testing.T) {
test.Assert(t, err != nil, "missing error")
}
func TestCommandReaderEmptyArgs(t *testing.T) {
_, err := fs.NewCommandReader(context.TODO(), []string{}, io.Discard)
test.Assert(t, err != nil, "missing error")
}
func TestCommandReaderOutput(t *testing.T) {
reader, err := fs.NewCommandReader(context.TODO(), []string{"echo", "hello world"}, io.Discard)
test.OK(t, err)