MemFSTest.CreateSymlink

geesefs-0-30-9
Aaron Jacobs 2015-05-19 15:22:31 +10:00
parent c478c23404
commit 0a9c888d54
1 changed files with 13 additions and 1 deletions

View File

@ -1136,7 +1136,19 @@ func (t *MemFSTest) HardLinks() {
}
func (t *MemFSTest) CreateSymlink() {
AssertTrue(false, "TODO")
var err error
symlinkName := path.Join(t.Dir, "foo")
target := "taco/burrito"
// Create.
err = os.Symlink(target, symlinkName)
AssertEq(nil, err)
// Read
actual, err := os.Readlink(symlinkName)
AssertEq(nil, err)
ExpectEq(target, actual)
}
func (t *MemFSTest) CreateSymlink_AlreadyExists() {