vendor: update all dependencies to latest versions
This commit is contained in:
parent
8e83fb6fb9
commit
7d3a17725d
4878 changed files with 1974229 additions and 201215 deletions
23
vendor/github.com/pengsrc/go-shared/check/dir_test.go
generated
vendored
Normal file
23
vendor/github.com/pengsrc/go-shared/check/dir_test.go
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
package check
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestCheckDir(t *testing.T) {
|
||||
// Path not exist.
|
||||
assert.Error(t, Dir("/not-exist-dir"))
|
||||
|
||||
// Path is not directory.
|
||||
f, err := ioutil.TempFile(os.TempDir(), "test-check-dir-")
|
||||
assert.NoError(t, err)
|
||||
f.Close()
|
||||
os.Remove(f.Name())
|
||||
|
||||
// OK.
|
||||
assert.NoError(t, Dir(os.TempDir()))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue