Skip to content

Commit

Permalink
e2e test for a private torrent file serde
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatson committed Jan 13, 2025
1 parent 26d78ed commit c13268d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/librqbit_core/src/resources/test/private.torrent
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d10:created by20:qBittorrent v4.4.3.113:creation datei1736784212e4:infod6:lengthi2e4:name7:private12:piece lengthi16384e6:pieces20:��D��S�s`�}]��^7:privatei1eee
7 changes: 7 additions & 0 deletions crates/librqbit_core/src/torrent_metainfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,4 +509,11 @@ mod tests {
}
}
}

#[test]
fn test_private_real_torrent() {
let buf = include_bytes!("resources/test/private.torrent");
let torrent: TorrentMetaV1Borrowed = torrent_from_bytes(buf).unwrap();
assert!(torrent.info.private);
}
}

0 comments on commit c13268d

Please sign in to comment.