diff --git a/README.md b/README.md index e0c268e..d980104 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ at any time. | [38](http://bittorrent.org/beps/bep_0038.html) | :heavy_minus_sign: | Finding Local Data Via Torrent File Hints | | [39](http://bittorrent.org/beps/bep_0039.html) | [:x:](https://github.com/casey/intermodal/issues/98) | Updating Torrents Via Feed URL | | [40](http://bittorrent.org/beps/bep_0040.html) | :heavy_minus_sign: | Canonical Peer Priority | -| [41](http://bittorrent.org/beps/bep_0041.html) | [:x:](https://github.com/casey/intermodal/issues/97) | UDP Tracker Protocol Extensions | +| [41](http://bittorrent.org/beps/bep_0041.html) | :heavy_minus_sign: | UDP Tracker Protocol Extensions | | [42](http://bittorrent.org/beps/bep_0042.html) | :heavy_minus_sign: | DHT Security extension | | [43](http://bittorrent.org/beps/bep_0043.html) | :heavy_minus_sign: | Read-only DHT Nodes | | [44](http://bittorrent.org/beps/bep_0044.html) | :heavy_minus_sign: | Storing arbitrary data in the DHT | diff --git a/src/torrent/create.rs b/src/torrent/create.rs index 0c9dafc..db712ff 100644 --- a/src/torrent/create.rs +++ b/src/torrent/create.rs @@ -256,6 +256,26 @@ mod tests { assert!(metainfo.announce_list.is_none()); } + #[test] + fn announce_udp() { + let mut env = environment(&[ + "--input", + "foo", + "--announce", + "udp://tracker.opentrackr.org:1337/announce", + ]); + fs::write(env.resolve("foo"), "").unwrap(); + env.run().unwrap(); + let torrent = env.resolve("foo.torrent"); + let bytes = fs::read(torrent).unwrap(); + let metainfo = serde_bencode::de::from_bytes::(&bytes).unwrap(); + assert_eq!( + metainfo.announce, + "udp://tracker.opentrackr.org:1337/announce" + ); + assert!(metainfo.announce_list.is_none()); + } + #[test] fn announce_single_tier() { let mut env = environment(&[