(t *testing.T)
| 207 | } |
| 208 | |
| 209 | func TestAddWhiteoutPath(t *testing.T) { |
| 210 | tree := NewFileTree() |
| 211 | node, _, err := tree.AddPath("usr/local/lib/python3.7/site-packages/pip/.wh..wh..opq", FileInfo{}) |
| 212 | if err != nil { |
| 213 | t.Errorf("expected no error but got: %v", err) |
| 214 | } |
| 215 | if node != nil { |
| 216 | t.Errorf("expected node to be nil, but got: %v", node) |
| 217 | } |
| 218 | expected := |
| 219 | `└── usr |
| 220 | └── local |
| 221 | └── lib |
| 222 | └── python3.7 |
| 223 | └── site-packages |
| 224 | └── pip |
| 225 | ` |
| 226 | actual := tree.String(false) |
| 227 | |
| 228 | if expected != actual { |
| 229 | t.Errorf("Expected tree string:\n--->%s<---\nGot:\n--->%s<---", expected, actual) |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | func TestRemovePath(t *testing.T) { |
| 234 | tree := NewFileTree() |
nothing calls this directly
no test coverage detected