gobot.io/x/gobot/v2@v2.1.0/system/fs_test.go (about) 1 package system 2 3 import ( 4 "os" 5 "testing" 6 7 "gobot.io/x/gobot/v2/gobottest" 8 ) 9 10 func TestFilesystemOpen(t *testing.T) { 11 fs := &nativeFilesystem{} 12 file, err := fs.openFile(os.DevNull, os.O_RDONLY, 0666) 13 gobottest.Assert(t, err, nil) 14 var _ File = file 15 } 16 17 func TestFilesystemStat(t *testing.T) { 18 fs := &nativeFilesystem{} 19 fileInfo, err := fs.stat(os.DevNull) 20 gobottest.Assert(t, err, nil) 21 gobottest.Refute(t, fileInfo, nil) 22 }