summaryrefslogtreecommitdiff
path: root/tests/reverse/correctness_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-09-25 15:32:46 +0200
committerJakob Unterwurzacher2016-09-25 16:43:17 +0200
commitffdb7cd47af8488ff282dbcbefdf884b9aadadff (patch)
tree6113d198427b800c9ccbe1d3e73f59cc91e0011a /tests/reverse/correctness_test.go
parent2050c7f3b3822a4a3329d4ba5b146d269ef05b4d (diff)
reverse: more thorough longname stat test
Now also verifies the returned file size.
Diffstat (limited to 'tests/reverse/correctness_test.go')
-rw-r--r--tests/reverse/correctness_test.go21
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go
index e268815..77a440b 100644
--- a/tests/reverse/correctness_test.go
+++ b/tests/reverse/correctness_test.go
@@ -3,15 +3,28 @@ package reverse_test
import (
"os"
"testing"
+ //"time"
+
+ "github.com/rfjakob/gocryptfs/tests/test_helpers"
)
func TestLongnameStat(t *testing.T) {
- _, err := os.Stat(dirA + "/" + "")
+ fd, err := os.Create(dirA + "/" + x240)
if err != nil {
- t.Error(err)
+ t.Fatal(err)
+ }
+ path := dirC + "/" + x240
+ if !test_helpers.VerifyExistence(path) {
+ t.Fail()
}
- _, err = os.Stat(dirA + "/" + "")
+ test_helpers.VerifySize(t, path, 0)
+ _, err = fd.Write(make([]byte, 10))
if err != nil {
- t.Error(err)
+ t.Fatal(err)
}
+ fd.Close()
+ /*
+ time.Sleep(1000 * time.Millisecond)
+ test_helpers.VerifySize(t, path, 10)
+ */
}