fork/gdu
git clone https://git.julia.blue/fork/gdu
8b8f1e9
subvolume
1//go:build freebsd || openbsd || netbsd || darwin 2 3package device 4 5import ( 6"testing" 7 8"github.com/stretchr/testify/assert" 9) 10 11func TestGetDevicesInfo (t * testing.T ) { 12getter := BSDDevicesInfoGetter {MountCmd :"/sbin/mount" } 13devices ,_ := getter .GetDevicesInfo () 14assert .IsType (t ,Devices {},devices ) 15} 16 17func TestGetDevicesInfoFail (t * testing.T ) { 18getter := BSDDevicesInfoGetter {MountCmd :"/nonexistent" } 19_ ,err := getter .GetDevicesInfo () 20assert .Equal (t ,"fork/exec /nonexistent: no such file or directory" ,err .Error ()) 21}