Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Gomes <[email protected]>
  • Loading branch information
pjbgf committed Mar 16, 2024
1 parent 9a476c0 commit 0bb341d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions memfs/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,16 @@ func (s *MemorySuite) TestTruncateAppend(c *C) {
}

func (s *MemorySuite) TestSymlink(c *C) {
s.FS.Symlink("test", "test")
_, err := s.FS.Open("test")
c.Assert(err, NotNil)
err := s.FS.Symlink("test", "test")
c.Assert(err, IsNil)
_, err = s.FS.Open("test")
c.Assert(err, Equals, os.ErrNotExist)
}

func (s *MemorySuite) TestOpen(c *C) {
err := util.WriteFile(s.FS, "foo", []byte("bar"), 0666)
c.Assert(err, IsNil)

_, err = s.FS.Open("foo")
c.Assert(err, IsNil)
}

0 comments on commit 0bb341d

Please sign in to comment.