mirror of
https://github.com/vbatts/sl-feeds.git
synced 2024-11-21 23:35:39 +00:00
test: prep for testing other folks' ChangeLog.txt
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
1cca828855
commit
de7b0fc949
6 changed files with 2409 additions and 5 deletions
|
@ -7,7 +7,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFeed(t *testing.T) {
|
func TestFeed(t *testing.T) {
|
||||||
fh, err := os.Open("testdata/ChangeLog.txt")
|
fh, err := os.Open("testdata/slackware64/ChangeLog.txt")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestParse(t *testing.T) {
|
func TestParse(t *testing.T) {
|
||||||
fh, err := os.Open("testdata/ChangeLog.txt")
|
fh, err := os.Open("testdata/slackware64/ChangeLog.txt")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
2404
changelog/testdata/alien/kde/ChangeLog.txt
vendored
Normal file
2404
changelog/testdata/alien/kde/ChangeLog.txt
vendored
Normal file
File diff suppressed because it is too large
Load diff
|
@ -8,7 +8,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFetchChangeLog(t *testing.T) {
|
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()
|
defer server.Close()
|
||||||
|
|
||||||
r := Repo{
|
r := Repo{
|
||||||
|
@ -25,7 +25,7 @@ func TestFetchChangeLog(t *testing.T) {
|
||||||
t.Errorf("expected %d entries; got %d", expectedLen, len(e))
|
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 {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ func TestFind(t *testing.T) {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(paths) != 1 {
|
if len(paths) <= 0 {
|
||||||
t.Errorf("expected to find %d file, but found %d", 1, len(paths))
|
t.Errorf("expected to find %d file, but found %d", 1, len(paths))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue