(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func TestIPRange_ParseIPRangeList(t *testing.T) { |
| 13 | { |
| 14 | var r = values.ParseIPRangeList("") |
| 15 | logs.PrintAsJSON(r, t) |
| 16 | } |
| 17 | { |
| 18 | var r = values.ParseIPRangeList("192.168.2.1") |
| 19 | logs.PrintAsJSON(r, t) |
| 20 | } |
| 21 | { |
| 22 | var r = values.ParseIPRangeList(`192.168.2.1 |
| 23 | 192.168.1.100/24 |
| 24 | 192.168.1.1-192.168.2.100 |
| 25 | 192.168.1.2,192.168.2.200 |
| 26 | 192.168.2.200 - 192.168.2.100 |
| 27 | # 以下是错误的 |
| 28 | 192.168 |
| 29 | 192.168.100.1-1`) |
| 30 | logs.PrintAsJSON(r, t) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | func TestIPRange_Contains(t *testing.T) { |
| 35 | { |
nothing calls this directly
no test coverage detected