From 0bb341d08d0623cf5d59e0597972b383fec1625d Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Sat, 16 Mar 2024 07:02:45 +0000 Subject: [PATCH] WIP Signed-off-by: Paulo Gomes --- memfs/memory_test.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/memfs/memory_test.go b/memfs/memory_test.go index 043a9fb..85aa00a 100644 --- a/memfs/memory_test.go +++ b/memfs/memory_test.go @@ -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) }