1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-24 13:48:49 +08:00

24 lines
455 B
Go
Raw Permalink Normal View History

2022-11-20 19:22:26 +01:00
package system
2014-11-07 16:21:39 -08:00
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
2014-11-07 16:21:39 -08:00
)
func TestFilesystemOpen(t *testing.T) {
2022-11-05 07:42:28 +01:00
fs := &nativeFilesystem{}
file, err := fs.openFile(os.DevNull, os.O_RDONLY, 0o666)
require.NoError(t, err)
2014-11-07 16:21:39 -08:00
var _ File = file
}
func TestFilesystemStat(t *testing.T) {
2022-11-05 07:42:28 +01:00
fs := &nativeFilesystem{}
fileInfo, err := fs.stat(os.DevNull)
require.NoError(t, err)
assert.NotNil(t, fileInfo)
}