From 03553661d68a7aa6aab280dbcb37ba974eaf2c3f Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 3 Jan 2023 03:38:42 +0000 Subject: [PATCH] added test case for get_marks ipc message --- src/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 182d096..c52f468 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -216,7 +216,14 @@ fn get_tree() { #[test] fn get_marks() { - // todo!() + let mut sway = Sway::new(env!("SWAYSOCK")).unwrap(); + sway.run_command("unmark").unwrap(); + sway.run_command("mark test").unwrap(); + match sway.get_marks() { + Ok(response) => assert_eq!(response.into_iter().nth(0).unwrap(), "test"), + Err(e) => panic!("{}", e.to_string()), + } + sway.run_command("unmark").unwrap(); } #[test]