aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-12-06 15:10:23 +0100
committerJakob Unterwurzacher2015-12-06 15:10:23 +0100
commit7375d86adae6f9ddcb403c67c5a97ed917b2ae3f (patch)
tree1bf91b8434a1745642f6b3fc2b6a6fdfc6e2d30a
parent56888d83dd50a10bad56eaa512ce0b6a2f2d41ed (diff)
tests: add TestRename
-rw-r--r--integration_tests/main_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/integration_tests/main_test.go b/integration_tests/main_test.go
index f065c4a..7cc078d 100644
--- a/integration_tests/main_test.go
+++ b/integration_tests/main_test.go
@@ -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)
+ }
+}