Browse Source

Add test case with a single app

pull/8/head
Daniel Martí 10 years ago
parent
commit
db14b8a100
  1. 23
      index_test.go

23
index_test.go

@ -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)

Loading…
Cancel
Save