hybridgroup.gobot/sysfs/fs_test.go

23 lines
437 B
Go
Raw Normal View History

2014-11-08 08:21:39 +08:00
package sysfs
import (
"os"
"testing"
"gobot.io/x/gobot/gobottest"
2014-11-08 08:21:39 +08:00
)
func TestFilesystemOpen(t *testing.T) {
SetFilesystem(&NativeFilesystem{})
file, err := OpenFile(os.DevNull, os.O_RDONLY, 666)
gobottest.Assert(t, err, nil)
2014-11-08 08:21:39 +08:00
var _ File = file
}
func TestFilesystemStat(t *testing.T) {
SetFilesystem(&NativeFilesystem{})
fileInfo, err := Stat(os.DevNull)
gobottest.Assert(t, err, nil)
gobottest.Refute(t, fileInfo, nil)
}