(t *testing.T)
| 2994 | } |
| 2995 | |
| 2996 | func 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 | } |
nothing calls this directly
no test coverage detected