From 1c73aa4b153812fbc64d98b609375cec617c073e Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 12 Jun 2016 05:54:54 +0200 Subject: Glob --- bencode/bencode_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bencode/bencode_test.go') 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 -- cgit v1.2.3