(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestIsAbsolutePath(t *testing.T) { |
| 10 | t.Parallel() |
| 11 | |
| 12 | tests := []struct { |
| 13 | path string |
| 14 | want bool |
| 15 | }{ |
| 16 | {"/home/coder/PLAN.md", true}, |
| 17 | {"/workspace/project/plan.md", true}, |
| 18 | {"plan.md", false}, |
| 19 | {"./plan.md", false}, |
| 20 | {"../plan.md", false}, |
| 21 | {"", false}, |
| 22 | } |
| 23 | |
| 24 | for _, tt := range tests { |
| 25 | t.Run(tt.path, func(t *testing.T) { |
| 26 | t.Parallel() |
| 27 | require.Equal(t, tt.want, isAbsolutePath(tt.path)) |
| 28 | }) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | func TestLooksLikePlanFileName(t *testing.T) { |
| 33 | t.Parallel() |
nothing calls this directly
no test coverage detected