added test case for get_marks ipc message

This commit is contained in:
Michael 2023-01-03 03:38:42 +00:00
parent 5d6ddfbf6b
commit 03553661d6
Signed by: michael
GPG Key ID: 523BD9EF68BDD44C

View File

@ -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]