about summary refs log tree commit diff stats
path: root/crates/libmpv2/src/mpv.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-14 20:59:32 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-14 21:02:12 +0200
commitbaffdf885aab7490e1024a73f8ee3ce35817c586 (patch)
treec2775b605b27cf9293dfdd2e2b933f5c3def26d8 /crates/libmpv2/src/mpv.rs
parentbuild(scripts/mkdb.sh): Update to use new sql schema path (diff)
downloadyt-baffdf885aab7490e1024a73f8ee3ce35817c586.tar.gz
yt-baffdf885aab7490e1024a73f8ee3ce35817c586.zip
test(treewide): Fix, so they compile and ignore
The tests are just not in an ideal state right now. Running them via
`cargo test` still works, but the `yt_dlp` test simply seem to deadlock?
Diffstat (limited to '')
-rw-r--r--crates/libmpv2/src/mpv.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/libmpv2/src/mpv.rs b/crates/libmpv2/src/mpv.rs
index bf4581e..07d0976 100644
--- a/crates/libmpv2/src/mpv.rs
+++ b/crates/libmpv2/src/mpv.rs
@@ -566,15 +566,21 @@ impl Mpv {
     ///
     /// # Examples
     ///
-    /// ```
+    /// ```dont_run
     /// # use libmpv2::{Mpv};
     /// # use libmpv2::mpv_node::MpvNode;
+    /// # use libmpv2::mpv::errors::Result;
     /// # use std::collections::HashMap;
+    /// #
+    /// # fn main() -> Result<()> {
+    /// # let mpv = Mpv::new()?;
     /// mpv.command("loadfile", &["test-data/jellyfish.mp4", "append-play"]).unwrap();
     /// # let node = mpv.get_property::<MpvNode>("playlist").unwrap();
     /// # let mut list = node.array().unwrap().collect::<Vec<_>>();
     /// # let map = list.pop().unwrap().map().unwrap().collect::<HashMap<_, _>>();
     /// # assert_eq!(map, HashMap::from([(String::from("id"), MpvNode::Int64(1)), (String::from("current"), MpvNode::Flag(true)), (String::from("filename"), MpvNode::String(String::from("test-data/jellyfish.mp4")))]));
+    /// # Ok(())
+    /// # }
     /// ```
     pub fn command(&self, name: &str, args: &[&str]) -> Result<()> {
         let mut cmd = name.to_owned();