mirror of
https://github.com/rumanzo/bt2qbt.git
synced 2024-11-22 02:12:39 +01:00
Additional test with special symbols
This commit is contained in:
parent
ed90ba1226
commit
a25c2670ff
@ -1191,6 +1191,35 @@ func TestTransferStructure_HandleSavePaths(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "035 Test torrent with windows folder (NoSubfolder) with special symbols.",
|
||||
newTransferStructure: &TransferStructure{
|
||||
Fastresume: &qBittorrentStructures.QBittorrentFastresume{},
|
||||
ResumeItem: &utorrentStructs.ResumeItem{Path: `D:\torrents\renamed test_torrent`},
|
||||
TorrentFile: &torrentStructures.Torrent{
|
||||
Info: &torrentStructures.TorrentInfo{
|
||||
Name: "test_torrent",
|
||||
Files: []*torrentStructures.TorrentFile{
|
||||
&torrentStructures.TorrentFile{Path: []string{`#test _ test [01]{1} [6K].jpg`}},
|
||||
&torrentStructures.TorrentFile{Path: []string{`testdir1 collection`, `testdir2_`, `1.jpg`}},
|
||||
},
|
||||
},
|
||||
},
|
||||
Opts: &options.Opts{PathSeparator: `\`},
|
||||
},
|
||||
expected: &TransferStructure{
|
||||
Fastresume: &qBittorrentStructures.QBittorrentFastresume{
|
||||
QbtSavePath: `D:/torrents/renamed test_torrent`,
|
||||
SavePath: `D:\torrents\renamed test_torrent`,
|
||||
QBtContentLayout: "NoSubfolder",
|
||||
MappedFiles: []string{
|
||||
`#test _ test [01]{1} [6K].jpg`,
|
||||
`testdir1 collection\testdir2_\1.jpg`,
|
||||
},
|
||||
},
|
||||
Opts: &options.Opts{PathSeparator: `\`},
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, testCase := range cases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user