aboutsummaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/testdata/NetBSD-7.0.1-amd64.iso.torrentbin0 -> 29937 bytes
-rw-r--r--meta/testdata/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrentbin0 -> 18257 bytes
-rw-r--r--meta/testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrentbin0 -> 16847 bytes
-rw-r--r--meta/testdata/debian-8.5.0-amd64-netinst.iso.torrentbin0 -> 20183 bytes
-rw-r--r--meta/testdata/minix_R3.3.0-588a35b.iso.bz2.torrentbin0 -> 46328 bytes
-rw-r--r--meta/testdata/multi.torrent1
-rw-r--r--meta/torrent_test.go16
7 files changed, 9 insertions, 8 deletions
diff --git a/meta/testdata/NetBSD-7.0.1-amd64.iso.torrent b/meta/testdata/NetBSD-7.0.1-amd64.iso.torrent
new file mode 100644
index 0000000..ca700ba
--- /dev/null
+++ b/meta/testdata/NetBSD-7.0.1-amd64.iso.torrent
Binary files differ
diff --git a/meta/testdata/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent b/meta/testdata/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent
new file mode 100644
index 0000000..186eba3
--- /dev/null
+++ b/meta/testdata/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent
Binary files differ
diff --git a/meta/testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrent b/meta/testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrent
new file mode 100644
index 0000000..f8fe7c1
--- /dev/null
+++ b/meta/testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrent
Binary files differ
diff --git a/meta/testdata/debian-8.5.0-amd64-netinst.iso.torrent b/meta/testdata/debian-8.5.0-amd64-netinst.iso.torrent
new file mode 100644
index 0000000..2b797b6
--- /dev/null
+++ b/meta/testdata/debian-8.5.0-amd64-netinst.iso.torrent
Binary files differ
diff --git a/meta/testdata/minix_R3.3.0-588a35b.iso.bz2.torrent b/meta/testdata/minix_R3.3.0-588a35b.iso.bz2.torrent
new file mode 100644
index 0000000..fb9d5d8
--- /dev/null
+++ b/meta/testdata/minix_R3.3.0-588a35b.iso.bz2.torrent
Binary files differ
diff --git a/meta/testdata/multi.torrent b/meta/testdata/multi.torrent
new file mode 100644
index 0000000..4176bb5
--- /dev/null
+++ b/meta/testdata/multi.torrent
@@ -0,0 +1 @@
+d8:announce27:http://example.com/announce10:created by26:Enhanced-CTorrent/dnh3.3.213:creation datei1467429222e4:infod5:filesld6:lengthi20183e4:pathl38:debian-8.5.0-amd64-netinst.iso.torrenteed6:lengthi2547e4:pathl14:freebsd.magenteed6:lengthi46328e4:pathl36:minix_R3.3.0-588a35b.iso.bz2.torrenteed6:lengthi29937e4:pathl30:NetBSD-7.0.1-amd64.iso.torrenteed6:lengthi18257e4:pathl55:OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrenteed6:lengthi16847e4:pathl41:OpenBSD_songs_ogg-2016-03-25-0127.torrenteee4:name9:examples/12:piece lengthi65536e6:pieces60:5/?.S}705eW0XqVQ[(JSWrAO(07ee \ No newline at end of file
diff --git a/meta/torrent_test.go b/meta/torrent_test.go
index f03142f..710d178 100644
--- a/meta/torrent_test.go
+++ b/meta/torrent_test.go
@@ -3,14 +3,14 @@ package meta
import "testing"
var tors = map[string]string{
- "bsd": "OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent",
- "ogg": "OpenBSD_songs_ogg-2016-03-25-0127.torrent",
- "deb": "debian-8.5.0-amd64-netinst.iso.torrent",
- "mul": "multi.torrent",
+ "bsd": "testdata/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent",
+ "ogg": "testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrent",
+ "deb": "testdata/debian-8.5.0-amd64-netinst.iso.torrent",
+ "mul": "testdata/multi.torrent",
}
func TestHash(t *testing.T) {
- tor, err := New("../testdata/" + tors["bsd"])
+ tor, err := New(tors["bsd"])
if err != nil {
t.Error(err)
}
@@ -20,7 +20,7 @@ func TestHash(t *testing.T) {
}
func TestPieces(t *testing.T) {
- tor, err := New("../testdata/" + tors["mul"])
+ tor, err := New(tors["mul"])
if err != nil {
t.Error(err)
}
@@ -31,7 +31,7 @@ func TestPieces(t *testing.T) {
}
func TestPieces2(t *testing.T) {
- tor, err := New("../testdata/" + tors["mul"])
+ tor, err := New(tors["mul"])
if err != nil {
t.Error(err)
}
@@ -42,7 +42,7 @@ func TestPieces2(t *testing.T) {
func TestReadAt(t *testing.T) {
t.Skip()
- tor, err := New("../testdata/" + tors["bsd"])
+ tor, err := New(tors["bsd"])
if err != nil {
t.Error(err)
}