aboutsummaryrefslogtreecommitdiff
path: root/tests/reverse
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-09-08 18:19:53 +0200
committerJakob Unterwurzacher2018-09-08 18:19:53 +0200
commit84d6fafeca8f1d7b1b631a56fc3dc47016c4ba31 (patch)
treec6fd0daf9f3e5837c4929372c6cfdd850ee4c834 /tests/reverse
parent930c37e03d5ff80e7cdc9f0ca2cd35d80a06d5c0 (diff)
tests: restore Go 1.7 compatibility
Go 1.7 does not have t.Name() yet.
Diffstat (limited to 'tests/reverse')
-rw-r--r--tests/reverse/correctness_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go
index 17c4cdd..bb93316 100644
--- a/tests/reverse/correctness_test.go
+++ b/tests/reverse/correctness_test.go
@@ -213,7 +213,9 @@ func TestTooLongSymlink(t *testing.T) {
// all directory in the path with O_RDONLY. Now it uses O_PATH, which only needs
// the executable bit.
func Test0100Dir(t *testing.T) {
- dir := dirA + "/" + t.Name()
+ // Note: t.Name() is not available before in Go 1.8
+ tName := "Test0100Dir"
+ dir := dirA + "/" + tName
err := os.Mkdir(dir, 0700)
if err != nil {
t.Fatal(err)
@@ -228,7 +230,7 @@ func Test0100Dir(t *testing.T) {
t.Fatal(err)
}
- fileReverse := dirC + "/" + t.Name() + "/hello"
+ fileReverse := dirC + "/" + tName + "/hello"
fd, err := os.Open(fileReverse)
// Make sure the dir can be removed after the test is done
os.Chmod(dir, 0700)