(t *testing.T)
| 234 | } |
| 235 | |
| 236 | func TestIsConflictError(t *testing.T) { |
| 237 | tests := []struct { |
| 238 | msg string |
| 239 | want bool |
| 240 | }{ |
| 241 | {"path/conflict/folder/", true}, |
| 242 | {"path/conflict/file/", true}, |
| 243 | {"path/not_found/", false}, |
| 244 | {"some other error", false}, |
| 245 | } |
| 246 | |
| 247 | for _, tt := range tests { |
| 248 | got := isConflictError(fmt.Errorf("%s", tt.msg)) |
| 249 | if got != tt.want { |
| 250 | t.Errorf("isConflictError(%q) = %v, want %v", tt.msg, got, tt.want) |
| 251 | } |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | func testMkdirCmd(t *testing.T) (*cobra.Command, *bytes.Buffer) { |
| 256 | t.Helper() |
nothing calls this directly
no test coverage detected