diff options
author | Jakob Unterwurzacher | 2017-01-26 20:49:35 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-01-26 20:49:35 +0100 |
commit | d2224aec5833ac7fabd73c56e43f3a4c820ac1ec (patch) | |
tree | 1d9a0b3ebc14d2149a640b095bee54602589a613 | |
parent | de87a256abcbf95e0417a2764be18dc3630eee8c (diff) |
tests: add TestLongLink (currently broken)
-rw-r--r-- | tests/matrix/matrix_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/matrix/matrix_test.go b/tests/matrix/matrix_test.go index 55f3947..9bb5bac 100644 --- a/tests/matrix/matrix_test.go +++ b/tests/matrix/matrix_test.go @@ -621,6 +621,23 @@ func TestLongNames(t *testing.T) { } } +// Create hard link with long name. +// This was broken up to v1.2. +func TestLongLink(t *testing.T) { + wd := test_helpers.DefaultPlainDir + "/" + target := wd + "TestLongLink.target" + f, err := os.Create(target) + if err != nil { + t.Fatalf("%v", err) + } + f.Close() + l255 := string(bytes.Repeat([]byte("l"), 255)) + err = os.Link(target, wd+l255) + if err != nil { + t.Error(err) + } +} + func TestLchown(t *testing.T) { name := test_helpers.DefaultPlainDir + "/symlink" err := os.Symlink("/target/does/not/exist", name) |