We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3951c1 commit ecaac2fCopy full SHA for ecaac2f
validate.go
@@ -16,5 +16,5 @@ func doesFileExist(p string) bool {
16
}
17
18
func isValidFolderPath(s string) bool {
19
- return true
+ return doesFileExist(s)
20
validate_test.go
@@ -15,3 +15,11 @@ func TestDoesFileExist(t *testing.T) {
15
assert.True(t, doesFileExist("lock.go"))
assert.False(t, doesFileExist("<.txt"))
+
+func TestIsValidFilePath(t *testing.T) {
+ assert.True(t, isValidFolderPath("."))
21
+ assert.True(t, isValidFolderPath("./tests"))
22
+ assert.True(t, isValidFolderPath("tests"))
23
+ assert.False(t, isValidFolderPath("./testies"))
24
+ assert.False(t, isValidFolderPath("testies"))
25
+}
0 commit comments