aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-12-15 14:42:14 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-12-15 14:42:14 +0100
commit74f1a9e6a121b4699425bfad4b9f6ec0ba7bec61 (patch)
treea25436cc107e9690c4f59bc4c184bbdd40ecf7b8
parent1f51887dbe2c1c6766841c9a804bf3ed5ac97d0b (diff)
rename
-rw-r--r--bencode/bencode_test.go6
-rw-r--r--meta/torrent_test.go8
-rw-r--r--testdata/NetBSD-7.0.1-amd64.iso.torrent (renamed from examples/NetBSD-7.0.1-amd64.iso.torrent)bin29937 -> 29937 bytes
-rw-r--r--testdata/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent (renamed from examples/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent)bin18257 -> 18257 bytes
-rw-r--r--testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrent (renamed from examples/OpenBSD_songs_ogg-2016-03-25-0127.torrent)bin16847 -> 16847 bytes
-rw-r--r--testdata/debian-8.5.0-amd64-netinst.iso.torrent (renamed from examples/debian-8.5.0-amd64-netinst.iso.torrent)bin20183 -> 20183 bytes
-rw-r--r--testdata/freebsd.magnet (renamed from examples/freebsd.magnet)0
-rw-r--r--testdata/minix_R3.3.0-588a35b.iso.bz2.torrent (renamed from examples/minix_R3.3.0-588a35b.iso.bz2.torrent)bin46328 -> 46328 bytes
-rw-r--r--testdata/multi.torrent (renamed from examples/multi.torrent)0
-rw-r--r--testdata/tr_resp.compact (renamed from examples/tr_resp.compact)bin179 -> 179 bytes
-rw-r--r--testdata/tr_resp.verbose (renamed from examples/tr_resp.verbose)0
-rw-r--r--tracker/messages_test.go4
12 files changed, 9 insertions, 9 deletions
diff --git a/bencode/bencode_test.go b/bencode/bencode_test.go
index 48c494d..a194fb6 100644
--- a/bencode/bencode_test.go
+++ b/bencode/bencode_test.go
@@ -50,15 +50,15 @@ var testCase = []struct {
InfoHash string
}{
{
- Torrent: "../examples/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent",
+ Torrent: "../testdata/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent",
InfoHash: "e840038dea1998c39614dcd28594501df02bd32d",
},
{
- Torrent: "../examples/OpenBSD_songs_ogg-2016-03-25-0127.torrent",
+ Torrent: "../testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrent",
InfoHash: "1aa5af9f6f533961a65169bdeeb801e611724d32",
},
{
- Torrent: "../examples/debian-8.5.0-amd64-netinst.iso.torrent",
+ Torrent: "../testdata/debian-8.5.0-amd64-netinst.iso.torrent",
InfoHash: "47b9ad52c009f3bd562ffc6da40e5c55d3fb47f3",
},
}
diff --git a/meta/torrent_test.go b/meta/torrent_test.go
index 78d6c77..ac54b95 100644
--- a/meta/torrent_test.go
+++ b/meta/torrent_test.go
@@ -10,7 +10,7 @@ var tors = map[string]string{
}
func TestHash(t *testing.T) {
- tor, err := New("../examples/" + tors["bsd"])
+ tor, err := New("../testdata/" + 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("../examples/" + tors["mul"])
+ tor, err := New("../testdata/" + 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("../examples/" + tors["mul"])
+ tor, err := New("../testdata/" + 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("../examples/" + tors["bsd"])
+ tor, err := New("../testdata/" + tors["bsd"])
if err != nil {
t.Error(err)
}
diff --git a/examples/NetBSD-7.0.1-amd64.iso.torrent b/testdata/NetBSD-7.0.1-amd64.iso.torrent
index ca700ba..ca700ba 100644
--- a/examples/NetBSD-7.0.1-amd64.iso.torrent
+++ b/testdata/NetBSD-7.0.1-amd64.iso.torrent
Binary files differ
diff --git a/examples/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent b/testdata/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent
index 186eba3..186eba3 100644
--- a/examples/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent
+++ b/testdata/OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent
Binary files differ
diff --git a/examples/OpenBSD_songs_ogg-2016-03-25-0127.torrent b/testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrent
index f8fe7c1..f8fe7c1 100644
--- a/examples/OpenBSD_songs_ogg-2016-03-25-0127.torrent
+++ b/testdata/OpenBSD_songs_ogg-2016-03-25-0127.torrent
Binary files differ
diff --git a/examples/debian-8.5.0-amd64-netinst.iso.torrent b/testdata/debian-8.5.0-amd64-netinst.iso.torrent
index 2b797b6..2b797b6 100644
--- a/examples/debian-8.5.0-amd64-netinst.iso.torrent
+++ b/testdata/debian-8.5.0-amd64-netinst.iso.torrent
Binary files differ
diff --git a/examples/freebsd.magnet b/testdata/freebsd.magnet
index 26b8e42..26b8e42 100644
--- a/examples/freebsd.magnet
+++ b/testdata/freebsd.magnet
diff --git a/examples/minix_R3.3.0-588a35b.iso.bz2.torrent b/testdata/minix_R3.3.0-588a35b.iso.bz2.torrent
index fb9d5d8..fb9d5d8 100644
--- a/examples/minix_R3.3.0-588a35b.iso.bz2.torrent
+++ b/testdata/minix_R3.3.0-588a35b.iso.bz2.torrent
Binary files differ
diff --git a/examples/multi.torrent b/testdata/multi.torrent
index 4176bb5..4176bb5 100644
--- a/examples/multi.torrent
+++ b/testdata/multi.torrent
diff --git a/examples/tr_resp.compact b/testdata/tr_resp.compact
index 7093321..7093321 100644
--- a/examples/tr_resp.compact
+++ b/testdata/tr_resp.compact
Binary files differ
diff --git a/examples/tr_resp.verbose b/testdata/tr_resp.verbose
index b620bf9..b620bf9 100644
--- a/examples/tr_resp.verbose
+++ b/testdata/tr_resp.verbose
diff --git a/tracker/messages_test.go b/tracker/messages_test.go
index bc7fcd0..7093939 100644
--- a/tracker/messages_test.go
+++ b/tracker/messages_test.go
@@ -8,7 +8,7 @@ import (
)
func TestParseResponseCompact(t *testing.T) {
- body, err := ioutil.ReadFile("../examples/tr_resp.compact")
+ body, err := ioutil.ReadFile("../testdata/tr_resp.compact")
if err != nil {
t.Error(err)
}
@@ -21,7 +21,7 @@ func TestParseResponseCompact(t *testing.T) {
}
func TestParseResponseVerbose(t *testing.T) {
- body, err := ioutil.ReadFile("../examples/tr_resp.verbose")
+ body, err := ioutil.ReadFile("../testdata/tr_resp.verbose")
if err != nil {
t.Error(err)
}