mirror of
https://github.com/vbatts/sl-feeds.git
synced 2024-11-28 02:15:40 +00:00
changelog: add test for slackwareaarch64
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
1e645e4616
commit
e826043c5c
2 changed files with 6583 additions and 23 deletions
|
@ -6,8 +6,23 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var changelogs = []struct {
|
||||||
|
File string
|
||||||
|
Url string
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
File: "testdata/slackwareaarch64-current/ChangeLog.txt",
|
||||||
|
Url: "http://ftp.arm.slackware.com/slackwarearm/slackwareaarch64-current/ChangeLog.txt",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
File: "testdata/slackware64/ChangeLog.txt",
|
||||||
|
Url: "http://slackware.osuosl.org/slackware64-current/ChangeLog.txt",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
func TestFeed(t *testing.T) {
|
func TestFeed(t *testing.T) {
|
||||||
fh, err := os.Open("testdata/slackware64/ChangeLog.txt")
|
for _, cl := range changelogs {
|
||||||
|
fh, err := os.Open(cl.File)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -18,7 +33,7 @@ func TestFeed(t *testing.T) {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
f, err := ToFeed("http://slackware.osuosl.org/slackware64-current/ChangeLog.txt", e)
|
f, err := ToFeed(cl.Url, e)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -35,4 +50,5 @@ func TestFeed(t *testing.T) {
|
||||||
if err := f.WriteRss(ioutil.Discard); err != nil {
|
if err := f.WriteRss(ioutil.Discard); err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
6544
changelog/testdata/slackwareaarch64-current/ChangeLog.txt
vendored
Normal file
6544
changelog/testdata/slackwareaarch64-current/ChangeLog.txt
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue