mirror of
https://github.com/rclone/rclone.git
synced 2025-08-19 01:46:31 +02:00
vfs: add ECLOSED and tidy errors
This commit is contained in:
@@ -61,7 +61,7 @@ func TestWriteFileHandleMethods(t *testing.T) {
|
||||
|
||||
// Check double close
|
||||
err = fh.Close()
|
||||
assert.Equal(t, EBADF, err)
|
||||
assert.Equal(t, ECLOSED, err)
|
||||
|
||||
// check vfs
|
||||
root, err := vfs.Root()
|
||||
@@ -105,7 +105,7 @@ func TestWriteFileHandleWriteAt(t *testing.T) {
|
||||
|
||||
// Check can't write on closed handle
|
||||
n, err = fh.WriteAt([]byte("hello"), 0)
|
||||
assert.Equal(t, EBADF, err)
|
||||
assert.Equal(t, ECLOSED, err)
|
||||
assert.Equal(t, 0, n)
|
||||
|
||||
// check vfs
|
||||
|
Reference in New Issue
Block a user