mirror of
https://github.com/restic/restic.git
synced 2025-12-14 13:02:04 +00:00
fix panic in fs_reader
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user