mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-06 16:40:32 +00:00
fix: torrent file path resolve (#173)
This commit is contained in:
5 files changed
+13
-16
No files matched your search
@@ -36,13 +36,6 @@ func TestParseSchema(t *testing.T) {
|
||||
},
|
||||
want: "FILE",
|
||||
},
|
||||
{
|
||||
name: "file-not-exists",
|
||||
args: args{
|
||||
url: "not.txt",
|
||||
},
|
||||
want: "",
|
||||
},
|
||||
{
|
||||
name: "file-no-scheme",
|
||||
args: args{
|
||||
@@ -57,6 +50,13 @@ func TestParseSchema(t *testing.T) {
|
||||
},
|
||||
want: "APPLICATION/X-BITTORRENT",
|
||||
},
|
||||
{
|
||||
name: "windows-path",
|
||||
args: args{
|
||||
url: "D:\\bt.torrent",
|
||||
},
|
||||
want: "FILE",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user