diff --git a/crates/librqbit_core/src/resources/test/private.torrent b/crates/librqbit_core/src/resources/test/private.torrent new file mode 100644 index 00000000..f737e4c3 --- /dev/null +++ b/crates/librqbit_core/src/resources/test/private.torrent @@ -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 \ No newline at end of file diff --git a/crates/librqbit_core/src/torrent_metainfo.rs b/crates/librqbit_core/src/torrent_metainfo.rs index 1d026ef1..c5b0ea05 100644 --- a/crates/librqbit_core/src/torrent_metainfo.rs +++ b/crates/librqbit_core/src/torrent_metainfo.rs @@ -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); + } }