aboutsummaryrefslogtreecommitdiff
path: root/internal/osutil/osutil_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/osutil/osutil_test.go')
-rw-r--r--internal/osutil/osutil_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/internal/osutil/osutil_test.go b/internal/osutil/osutil_test.go
index adaebebf..4c9a2ad7 100644
--- a/internal/osutil/osutil_test.go
+++ b/internal/osutil/osutil_test.go
@@ -32,3 +32,26 @@ func TestIsFile(t *testing.T) {
})
}
}
+
+func TestIsExist(t *testing.T) {
+ tests := []struct {
+ path string
+ expVal bool
+ }{
+ {
+ path: "osutil.go",
+ expVal: true,
+ }, {
+ path: "../osutil",
+ expVal: true,
+ }, {
+ path: "not_found",
+ expVal: false,
+ },
+ }
+ for _, test := range tests {
+ t.Run("", func(t *testing.T) {
+ assert.Equal(t, test.expVal, IsExist(test.path))
+ })
+ }
+}