MCPcopy Index your code
hub / github.com/coder/coder / TestLooksLikeHomePlanFile

Function TestLooksLikeHomePlanFile

coderd/x/chatd/chattool/planpath_test.go:133–219  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

131}
132
133func TestLooksLikeHomePlanFile(t *testing.T) {
134 t.Parallel()
135
136 tests := []struct {
137 name string
138 requested string
139 home string
140 want bool
141 }{
142 {
143 name: "UppercaseHomeRootPlan",
144 requested: "/home/coder/PLAN.md",
145 home: "/home/coder",
146 want: true,
147 },
148 {
149 name: "LowercaseHomeRootPlan",
150 requested: "/home/coder/plan.md",
151 home: "/home/coder",
152 want: true,
153 },
154 {
155 name: "MixedCaseHomeRootPlan",
156 requested: "/home/coder/Plan.md",
157 home: "/home/coder",
158 want: true,
159 },
160 {
161 name: "UppercaseExtension",
162 requested: "/home/coder/PLAN.MD",
163 home: "/home/coder",
164 want: true,
165 },
166 {
167 name: "CustomHomeRootPlan",
168 requested: "/Users/dev/plan.md",
169 home: "/Users/dev",
170 want: true,
171 },
172 {
173 name: "NestedPlanUnderHome",
174 requested: "/home/coder/myproject/plan.md",
175 home: "/home/coder",
176 want: false,
177 },
178 {
179 name: "PerChatPlanPath",
180 requested: "/home/coder/.coder/plans/PLAN-123e4567-e89b-12d3-a456-426614174000.md",
181 home: "/home/coder",
182 want: false,
183 },
184 {
185 name: "DifferentFilename",
186 requested: "/home/coder/README.md",
187 home: "/home/coder",
188 want: false,
189 },
190 {

Callers

nothing calls this directly

Calls 3

LooksLikeHomePlanFileFunction · 0.92
RunMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected