2
0
mirror of synced 2025-02-24 06:38:14 +00:00
torrent/util/dirwatch/dirwatch_test.go

22 lines
356 B
Go
Raw Normal View History

package dirwatch
import (
"io/ioutil"
"os"
"testing"
2018-01-06 16:53:40 +11:00
"github.com/stretchr/testify/require"
)
func TestDirwatch(t *testing.T) {
tempDirName, err := ioutil.TempDir("", "")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tempDirName)
2014-12-03 12:10:29 -06:00
t.Logf("tempdir: %q", tempDirName)
dw, err := New(tempDirName)
2018-01-06 16:53:40 +11:00
require.NoError(t, err)
2014-12-03 12:10:29 -06:00
defer dw.Close()
}