Browse Source

Test comma-separated, dates and hex values

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

13
index_test.go

@ -8,6 +8,7 @@ import (
"reflect" "reflect"
"strings" "strings"
"testing" "testing"
"time"
) )
func TestTextDesc(t *testing.T) { func TestTextDesc(t *testing.T) {
@ -66,25 +67,31 @@ func TestLoadIndexXML(t *testing.T) {
<application> <application>
<id>foo.bar</id> <id>foo.bar</id>
<name>Foo bar</name> <name>Foo bar</name>
<categories>Cat1,Cat2</categories>
<added>2015-10-02</added>
<package> <package>
<version>1.0</version> <version>1.0</version>
<versioncode>1</versioncode> <versioncode>1</versioncode>
<sig>0123456789abcdef</sig>
</package> </package>
</application> </application>
</fdroid>`, </fdroid>`,
Index{ Index{
Repo: Repo{ Repo: Repo{
Name: "Foo", Name: "Foo",
Version: 14, Version: 14,
}, },
Apps: []App{ Apps: []App{
{ {
ID: "foo.bar", ID: "foo.bar",
Name: "Foo bar", Name: "Foo bar",
Categs: []string{"Cat1", "Cat2"},
Added: DateVal{time.Date(2015, 10, 2, 0, 0, 0, 0, time.UTC)},
Apks: []Apk{ Apks: []Apk{
{ {
VName: "1.0", VName: "1.0",
VCode: 1, VCode: 1,
Sig: []byte{1, 35, 69, 103, 137, 171, 205, 239},
}, },
}, },
}, },

Loading…
Cancel
Save