From 706780000531d0cd98e764c52b85e85ab0929ea5 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 15 Dec 2018 15:50:36 +0100 Subject: move testdata to packages --- meta/testdata/NetBSD-7.0.1-amd64.iso.torrent | Bin 0 -> 29937 bytes ...nBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent | Bin 0 -> 18257 bytes meta/testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrent | Bin 0 -> 16847 bytes meta/testdata/debian-8.5.0-amd64-netinst.iso.torrent | Bin 0 -> 20183 bytes meta/testdata/minix_R3.3.0-588a35b.iso.bz2.torrent | Bin 0 -> 46328 bytes meta/testdata/multi.torrent | 1 + meta/torrent_test.go | 16 ++++++++-------- 7 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 meta/testdata/NetBSD-7.0.1-amd64.iso.torrent create mode 100644 meta/testdata/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent create mode 100644 meta/testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrent create mode 100644 meta/testdata/debian-8.5.0-amd64-netinst.iso.torrent create mode 100644 meta/testdata/minix_R3.3.0-588a35b.iso.bz2.torrent create mode 100644 meta/testdata/multi.torrent (limited to 'meta') 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 Binary files /dev/null and b/meta/testdata/NetBSD-7.0.1-amd64.iso.torrent 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 Binary files /dev/null and b/meta/testdata/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent 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 Binary files /dev/null and b/meta/testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrent 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 Binary files /dev/null and b/meta/testdata/debian-8.5.0-amd64-netinst.iso.torrent 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 Binary files /dev/null and b/meta/testdata/minix_R3.3.0-588a35b.iso.bz2.torrent 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) } -- cgit v1.2.3