(t *testing.T)
| 194 | } |
| 195 | |
| 196 | func TestGetDefaultBlockList(t *testing.T) { |
| 197 | blocklist := GetDefaultBlockList() |
| 198 | |
| 199 | if &blocklist[0] == &defaultBlockList[0] { |
| 200 | t.Error("GetDefaultBlockList should return a copy, not the original slice") |
| 201 | } |
| 202 | |
| 203 | assert.DeepEqual(t, blocklist, defaultBlockList) |
| 204 | |
| 205 | expectedItems := []string{"PATH", "HOME", "SSH_*", "USER"} |
| 206 | for _, item := range expectedItems { |
| 207 | found := slices.Contains(blocklist, item) |
| 208 | assert.Assert(t, found, "Expected builtin blocklist to contain %#q", item) |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | func TestValidatePattern(t *testing.T) { |
| 213 | tests := []struct { |
nothing calls this directly
no test coverage detected