mirror of
https://github.com/rclone/rclone.git
synced 2025-12-12 06:24:14 +01:00
vfs: add tests and subsequent fixes
* Tests for VFS layer * Small fixes found during testing * Fix Close, Flush and Release behaviour for ReadFileHandle and WriteFileHandle * Fix nil object bugs on File
This commit is contained in:
@@ -42,9 +42,9 @@ func TestWriteFileDoubleClose(t *testing.T) {
|
||||
_, err = syscall.Write(fd2, buf)
|
||||
assert.Error(t, err, "input/output error")
|
||||
|
||||
// close the dup - should produce an error
|
||||
// close the dup - should not produce an error
|
||||
err = syscall.Close(fd2)
|
||||
assert.Error(t, err, "input/output error")
|
||||
assert.NoError(t, err)
|
||||
|
||||
run.rm(t, "testdoubleclose")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user