(t *testing.T)
| 357 | } |
| 358 | |
| 359 | func TestNormalizePathSeparators(t *testing.T) { |
| 360 | t.Parallel() |
| 361 | tests := []struct { |
| 362 | name string |
| 363 | input string |
| 364 | expected string |
| 365 | }{ |
| 366 | {"Windows path", `D:\a\task\task`, `D:/a/task/task`}, |
| 367 | {"Unix path unchanged", `/home/user/task`, `/home/user/task`}, |
| 368 | {"Mixed separators", `C:\Users/name\file`, `C:/Users/name/file`}, |
| 369 | } |
| 370 | for _, tt := range tests { |
| 371 | t.Run(tt.name, func(t *testing.T) { |
| 372 | t.Parallel() |
| 373 | got := normalizePathSeparators(tt.input) |
| 374 | assert.Equal(t, tt.expected, got) |
| 375 | }) |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | // SyncBuffer is a threadsafe buffer for testing. |
| 380 | // Some times replace stdout/stderr with a buffer to capture output. |
nothing calls this directly
no test coverage detected
searching dependent graphs…