use super::*; // Progression: A -> B -> C -> D // as we press `A-)` const A: &str = indoc! {" #(a|)# #(b|)# #(c|)# #[d|]# #(e|)#" }; const B: &str = indoc! {" #(e|)# #(a|)# #(b|)# #(c|)# #[d|]#" }; const C: &str = indoc! {" #[d|]# #(e|)# #(a|)# #(b|)# #(c|)#" }; const D: &str = indoc! {" #(c|)# #[d|]# #(e|)# #(a|)# #(b|)#" }; #[tokio::test(flavor = "multi_thread")] async fn rotate_selection_contents_forward_repeated() -> anyhow::Result<()> { test((A, "", B)).await?; test((B, "", C)).await?; test((C, "", D)).await?; Ok(()) } #[tokio::test(flavor = "multi_thread")] async fn rotate_selection_contents_forward_with_count() -> anyhow::Result<()> { test((A, "2", C)).await?; test((A, "3", D)).await?; test((B, "2", D)).await?; Ok(()) } #[tokio::test(flavor = "multi_thread")] async fn rotate_selection_contents_backward_repeated() -> anyhow::Result<()> { test((D, "", C)).await?; test((C, "", B)).await?; test((B, "", A)).await?; Ok(()) } #[tokio::test(flavor = "multi_thread")] async fn rotate_selection_contents_backward_with_count() -> anyhow::Result<()> { test((D, "2", B)).await?; test((D, "3", A)).await?; test((C, "2", A)).await?; Ok(()) }