tests: add TestRename
This commit is contained in:
parent
56888d83dd
commit
7375d86ada
@ -324,3 +324,16 @@ func TestMkdirRmdir(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Test Rename
|
||||
func TestRename(t *testing.T) {
|
||||
err := ioutil.WriteFile(defaultPlainDir + "rename1", []byte("content"), 0777)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err = syscall.Rename(defaultPlainDir + "rename1", defaultPlainDir + "rename2")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user