Browse Source

test: prep for testing other folks' ChangeLog.txt

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
pull/13/head
Vincent Batts 5 years ago
parent
commit
de7b0fc949
Signed by: vbatts
GPG Key ID: 10937E57733F1362
  1. 2
      changelog/feeds_test.go
  2. 2
      changelog/parse_test.go
  3. 2404
      changelog/testdata/alien/kde/ChangeLog.txt
  4. 0
      changelog/testdata/slackware64/ChangeLog.txt
  5. 4
      fetch/fetch_test.go
  6. 2
      util/find_test.go

2
changelog/feeds_test.go

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

2
changelog/parse_test.go

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

File diff suppressed because it is too large Load Diff

0
changelog/testdata/ChangeLog.txt → changelog/testdata/slackware64/ChangeLog.txt vendored

4
fetch/fetch_test.go

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

2
util/find_test.go

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

Loading…
Cancel
Save