gobot.io/x/gobot@v1.16.0/sysfs/fs_test.go (about) 1 package sysfs 2 3 import ( 4 "os" 5 "testing" 6 7 "gobot.io/x/gobot/gobottest" 8 ) 9 10 func TestFilesystemOpen(t *testing.T) { 11 SetFilesystem(&NativeFilesystem{}) 12 file, err := OpenFile(os.DevNull, os.O_RDONLY, 666) 13 gobottest.Assert(t, err, nil) 14 var _ File = file 15 } 16 17 func TestFilesystemStat(t *testing.T) { 18 SetFilesystem(&NativeFilesystem{}) 19 fileInfo, err := Stat(os.DevNull) 20 gobottest.Assert(t, err, nil) 21 gobottest.Refute(t, fileInfo, nil) 22 }