TestPathWithSlashesToArray tests PathWithSlashesToArray
(t *testing.T)
| 20 | |
| 21 | // TestPathWithSlashesToArray tests PathWithSlashesToArray |
| 22 | func TestPathWithSlashesToArray(t *testing.T) { |
| 23 | testSources := []string{ |
| 24 | "sites/default/files", |
| 25 | "/sites/default/files", |
| 26 | "./sites/default/files", |
| 27 | } |
| 28 | |
| 29 | testExpectations := [][]string{ |
| 30 | {"sites", "sites/default", "sites/default/files"}, |
| 31 | {"/sites", "/sites/default", "/sites/default/files"}, |
| 32 | {".", "./sites", "./sites/default", "./sites/default/files"}, |
| 33 | } |
| 34 | |
| 35 | for i := range testSources { |
| 36 | res := nodeps.PathWithSlashesToArray(testSources[i]) |
| 37 | require.Equal(t, testExpectations[i], res) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | // TestParseURL tests the ParseURL function |
| 42 | func TestParseURL(t *testing.T) { |
nothing calls this directly
no test coverage detected