MemFSTest.RenameIntoFileSystem
parent
a69cbc2139
commit
542984f5bd
|
@ -1536,12 +1536,20 @@ func (t *MemFSTest) RenameOutOfFileSystem() {
|
||||||
ExpectThat(err, Error(HasSubstr("cross-device")))
|
ExpectThat(err, Error(HasSubstr("cross-device")))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *MemFSTest) RenameIntoFileSystem_File() {
|
func (t *MemFSTest) RenameIntoFileSystem() {
|
||||||
AssertTrue(false, "TODO")
|
var err error
|
||||||
}
|
|
||||||
|
|
||||||
func (t *MemFSTest) RenameIntoFileSystem_Directory() {
|
// Create a file outside of our file system.
|
||||||
AssertTrue(false, "TODO")
|
f, err := ioutil.TempFile("", "memfs_test")
|
||||||
|
AssertEq(nil, err)
|
||||||
|
defer f.Close()
|
||||||
|
|
||||||
|
oldPath := f.Name()
|
||||||
|
defer os.Remove(oldPath)
|
||||||
|
|
||||||
|
// Attempt to move it into the file system.
|
||||||
|
err = os.Rename(oldPath, path.Join(t.Dir, "bar"))
|
||||||
|
ExpectThat(err, Error(HasSubstr("cross-device")))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *MemFSTest) RenameOverExistingFile() {
|
func (t *MemFSTest) RenameOverExistingFile() {
|
||||||
|
|
Loading…
Reference in New Issue