aboutsummaryrefslogtreecommitdiff
path: root/internal/db/repo_editor_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/repo_editor_test.go')
-rw-r--r--internal/db/repo_editor_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/db/repo_editor_test.go b/internal/db/repo_editor_test.go
index 6aeed011..f6178eda 100644
--- a/internal/db/repo_editor_test.go
+++ b/internal/db/repo_editor_test.go
@@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert"
)
-func Test_isRepositoryGitPath(t *testing.T) {
+func TestIsRepositoryGitPath(t *testing.T) {
tests := []struct {
path string
wantVal bool
@@ -21,6 +21,13 @@ func Test_isRepositoryGitPath(t *testing.T) {
{path: ".git/hooks", wantVal: true},
{path: "dir/.git", wantVal: true},
+ // Case-insensitive file system
+ {path: ".Git", wantVal: true},
+ {path: "./.Git", wantVal: true},
+ {path: ".Git/hooks/pre-commit", wantVal: true},
+ {path: ".Git/hooks", wantVal: true},
+ {path: "dir/.Git", wantVal: true},
+
{path: ".gitignore", wantVal: false},
{path: "dir/.gitkeep", wantVal: false},