aboutsummaryrefslogtreecommitdiffstats
path: root/utils/fs/os/os_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils/fs/os/os_test.go')
-rw-r--r--utils/fs/os/os_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/fs/os/os_test.go b/utils/fs/os/os_test.go
index 756e284..2bb9391 100644
--- a/utils/fs/os/os_test.go
+++ b/utils/fs/os/os_test.go
@@ -3,6 +3,7 @@ package os_test
import (
"io/ioutil"
stdos "os"
+ "path/filepath"
"testing"
. "gopkg.in/check.v1"
@@ -27,3 +28,10 @@ func (s *OSSuite) TearDownTest(c *C) {
err := stdos.RemoveAll(s.path)
c.Assert(err, IsNil)
}
+
+func (s *OSSuite) TestOpenDoesNotCreateDir(c *C) {
+ _, err := s.Fs.Open("dir/non-existant")
+ c.Assert(err, NotNil)
+ _, err = stdos.Stat(filepath.Join(s.path, "dir"))
+ c.Assert(stdos.IsNotExist(err), Equals, true)
+}