mirror of
https://github.com/restic/restic.git
synced 2026-11-06 15:29:21 +00:00
fix panic in fs_reader
This commit is contained in:
1 parent
d407abb50f
commit
d8ea178e69
3 files changed
+15
No files matched your search
@@ -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