Skip to content
Permalink
Browse files

Include our own testdata, since Travis doesn't have /usr/share/dict/w…

…ords
  • Loading branch information...
dgryski committed Dec 1, 2013
1 parent ff25a94 commit 3a5b51d8591e948b8d8d58eb4bff9e8a66021f08
Showing with 13,053 additions and 18 deletions.
  1. +1 −18 lz4_test.go
  2. +13,052 −0 testdata/pg1661.txt
@@ -3,27 +3,10 @@ package lz4
import (
"bytes"
"io/ioutil"
"math/rand"
"testing"
)

//var testfile, _ = ioutil.ReadFile("testdata/pg1661.txt")
var testfile = shuffleFile("/usr/share/dict/words")

func shuffleFile(filename string) []byte {

data, _ := ioutil.ReadFile(filename)

lines := bytes.Split(data, []byte("\n"))
dst := make([][]byte, len(lines))

perm := rand.Perm(len(lines))
for i, v := range perm {
dst[i] = lines[v]
}

return bytes.Join(dst, []byte("\n"))
}
var testfile, _ = ioutil.ReadFile("testdata/pg1661.txt")

func roundtrip(t *testing.T, input []byte) {

0 comments on commit 3a5b51d

Please sign in to comment.
You can’t perform that action at this time.