2014-08-22 15:31:03 +08:00
|
|
|
package dirwatch
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
2018-01-06 13:53:40 +08:00
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
2014-08-22 15:31:03 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestDirwatch(t *testing.T) {
|
2022-02-02 15:26:46 +08:00
|
|
|
tempDirName := t.TempDir()
|
2014-12-04 02:10:29 +08:00
|
|
|
t.Logf("tempdir: %q", tempDirName)
|
2014-08-22 15:31:03 +08:00
|
|
|
dw, err := New(tempDirName)
|
2018-01-06 13:53:40 +08:00
|
|
|
require.NoError(t, err)
|
2014-12-04 02:10:29 +08:00
|
|
|
defer dw.Close()
|
2014-08-22 15:31:03 +08:00
|
|
|
}
|