tests: add TestRename

This commit is contained in:
Jakob Unterwurzacher 2015-12-06 15:10:23 +01:00
parent 56888d83dd
commit 7375d86ada

View File

@ -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)
}
}