1
0
Fork 0
mirror of https://github.com/vbatts/sl-feeds.git synced 2024-11-21 15:25:41 +00:00

test: prep for testing other folks' ChangeLog.txt

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-02-27 08:57:04 -05:00
parent 1cca828855
commit de7b0fc949
Signed by: vbatts
GPG key ID: 10937E57733F1362
6 changed files with 2409 additions and 5 deletions

View file

@ -7,7 +7,7 @@ import (
)
func TestFeed(t *testing.T) {
fh, err := os.Open("testdata/ChangeLog.txt")
fh, err := os.Open("testdata/slackware64/ChangeLog.txt")
if err != nil {
t.Fatal(err)
}

View file

@ -7,7 +7,7 @@ import (
)
func TestParse(t *testing.T) {
fh, err := os.Open("testdata/ChangeLog.txt")
fh, err := os.Open("testdata/slackware64/ChangeLog.txt")
if err != nil {
t.Fatal(err)
}

2404
changelog/testdata/alien/kde/ChangeLog.txt vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@ import (
)
func TestFetchChangeLog(t *testing.T) {
server := httptest.NewServer(http.FileServer(http.Dir("../changelog/testdata/")))
server := httptest.NewServer(http.FileServer(http.Dir("../changelog/testdata/slackware64/")))
defer server.Close()
r := Repo{
@ -25,7 +25,7 @@ func TestFetchChangeLog(t *testing.T) {
t.Errorf("expected %d entries; got %d", expectedLen, len(e))
}
stat, err := os.Stat("../changelog/testdata/ChangeLog.txt")
stat, err := os.Stat("../changelog/testdata/slackware64/ChangeLog.txt")
if err != nil {
t.Fatal(err)
}

View file

@ -8,7 +8,7 @@ func TestFind(t *testing.T) {
t.Fatal(err)
}
if len(paths) != 1 {
if len(paths) <= 0 {
t.Errorf("expected to find %d file, but found %d", 1, len(paths))
}
}