MCPcopy Create free account
hub / github.com/cozystack/talm / TestNormalizeTemplatePathWindows

Function TestNormalizeTemplatePathWindows

pkg/engine/engine_windows_test.go:21–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19import "testing"
20
21func TestNormalizeTemplatePathWindows(t *testing.T) {
22 tests := []struct {
23 name string
24 input string
25 want string
26 }{
27 {"backslash", "templates\\file.yaml", "templates/file.yaml"},
28 {"nested backslash", "templates\\nested\\file.yaml", "templates/nested/file.yaml"},
29 {"mixed slashes", "templates\\nested/file.yaml", "templates/nested/file.yaml"},
30 {"trailing backslash", "templates\\", "templates/"},
31 }
32
33 for _, tt := range tests {
34 t.Run(tt.name, func(t *testing.T) {
35 if got := NormalizeTemplatePath(tt.input); got != tt.want {
36 t.Errorf("NormalizeTemplatePath(%q) = %q, want %q", tt.input, got, tt.want)
37 }
38 })
39 }
40}

Callers

nothing calls this directly

Calls 1

NormalizeTemplatePathFunction · 0.85

Tested by

no test coverage detected