MCPcopy Create free account
hub / github.com/go-git/go-git / TestWindowsValidPath

Function TestWindowsValidPath

worktree_test.go:2996–3021  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2994}
2995
2996func TestWindowsValidPath(t *testing.T) {
2997 tests := []struct {
2998 path string
2999 want bool
3000 }{
3001 {".git", false},
3002 {".git . . .", false},
3003 {".git ", false},
3004 {".git ", false},
3005 {".git . .", false},
3006 {".git . .", false},
3007 {".git::$INDEX_ALLOCATION", false},
3008 {".git:", false},
3009 {"a", true},
3010 {"a\\b", true},
3011 {"a/b", true},
3012 {".gitm", true},
3013 }
3014
3015 for _, tc := range tests {
3016 t.Run(fmt.Sprintf("%s", tc.path), func(t *testing.T) {
3017 got := windowsValidPath(tc.path)
3018 assert.Equal(t, tc.want, got)
3019 })
3020 }
3021}

Callers

nothing calls this directly

Calls 1

windowsValidPathFunction · 0.85

Tested by

no test coverage detected