aboutsummaryrefslogtreecommitdiff
path: root/bencode
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-06-12 05:54:54 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-06-12 05:54:54 +0200
commit1c73aa4b153812fbc64d98b609375cec617c073e (patch)
treec03e951ed755de10ad8d23b2127bf67c92d8765f /bencode
parenta1bb30303a3ae28c12eca6e6d1f523719de3870a (diff)
Glob
Diffstat (limited to 'bencode')
-rw-r--r--bencode/bencode_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/bencode/bencode_test.go b/bencode/bencode_test.go
index 9ee40d7..51c5bae 100644
--- a/bencode/bencode_test.go
+++ b/bencode/bencode_test.go
@@ -2,6 +2,7 @@ package bencode
import (
"io/ioutil"
+ "path/filepath"
"testing"
"time"
@@ -45,10 +46,9 @@ func TestParseInt(t *testing.T) {
}
func TestUnmarshal(t *testing.T) {
- files := []string{
- "../examples/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent",
- "../examples/OpenBSD_songs_ogg-2016-03-25-0127.torrent",
- "../examples/debian-8.5.0-amd64-netinst.iso.torrent",
+ files, err := filepath.Glob("../examples/*.torrent")
+ if err != nil {
+ t.Error(err)
}
for _, file := range files {
var tor torrent.Torrent