|
|
|
|
@ -62,8 +62,7 @@ func TestLoadIndexXML(t *testing.T) {
|
|
|
|
|
}{ |
|
|
|
|
{ |
|
|
|
|
`<fdroid> |
|
|
|
|
<repo name="Foo" version="14"> |
|
|
|
|
</repo> |
|
|
|
|
<repo name="Foo" version="14"/> |
|
|
|
|
</fdroid>`, |
|
|
|
|
Index{ |
|
|
|
|
Repo: Repo{ |
|
|
|
|
@ -72,6 +71,26 @@ func TestLoadIndexXML(t *testing.T) {
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
`<fdroid> |
|
|
|
|
<repo name="Foo"/> |
|
|
|
|
<application> |
|
|
|
|
<id>foo.bar</id> |
|
|
|
|
<name>Foo bar</name> |
|
|
|
|
</application> |
|
|
|
|
</fdroid>`, |
|
|
|
|
Index{ |
|
|
|
|
Repo: Repo{ |
|
|
|
|
Name: "Foo", |
|
|
|
|
}, |
|
|
|
|
Apps: []App{ |
|
|
|
|
{ |
|
|
|
|
ID: "foo.bar", |
|
|
|
|
Name: "Foo bar", |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
for _, c := range tests { |
|
|
|
|
r := strings.NewReader(c.in) |
|
|
|
|
|