aboutsummaryrefslogtreecommitdiff
path: root/tests/reverse/correctness_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-09-25 18:01:24 +0200
committerJakob Unterwurzacher2016-09-25 18:01:24 +0200
commitb883dd10a62eb8d7ddf589e2878d8e0f65a90e83 (patch)
treebd500c18f8c7bd8095617011eb0ea3dace11ac5c /tests/reverse/correctness_test.go
parent12808138ef105824de97924a585ad66bacb3a18b (diff)
reverse: add symlink encryption and Readlink support
Diffstat (limited to 'tests/reverse/correctness_test.go')
-rw-r--r--tests/reverse/correctness_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go
index 77a440b..40bd320 100644
--- a/tests/reverse/correctness_test.go
+++ b/tests/reverse/correctness_test.go
@@ -28,3 +28,24 @@ func TestLongnameStat(t *testing.T) {
test_helpers.VerifySize(t, path, 10)
*/
}
+
+func TestSymlinks(t *testing.T) {
+ target := "/"
+ os.Symlink(target, dirA+"/symlink")
+ cSymlink := dirC + "/symlink"
+ _, err := os.Lstat(cSymlink)
+ if err != nil {
+ t.Errorf("Lstat: %v", err)
+ }
+ _, err = os.Stat(cSymlink)
+ if err != nil {
+ t.Errorf("Stat: %v", err)
+ }
+ actualTarget, err := os.Readlink(cSymlink)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if target != actualTarget {
+ t.Errorf("wrong symlink target: want=%q have=%q", target, actualTarget)
+ }
+}