@@ -12,15 +12,13 @@ async fn test_selection_duplication() -> anyhow::Result<()> {
1212 #[lo|]#rem
1313 ipsum
1414 dolor
15− "})
16− .as_str(),
15+ "}),
1716 "CC",
1817 platform_line(indoc! {"\
1918 #(lo|)#rem
2019 #(ip|)#sum
2120 #[do|]#lor
22− "})
23− .as_str(),
21+ "}),
2422 ))
2523 .await?;
2624
@@ -30,15 +28,13 @@ async fn test_selection_duplication() -> anyhow::Result<()> {
3028 #[|lo]#rem
3129 ipsum
3230 dolor
33− "})
34− .as_str(),
31+ "}),
3532 "CC",
3633 platform_line(indoc! {"\
3734 #(|lo)#rem
3835 #(|ip)#sum
3936 #[|do]#lor
40− "})
41− .as_str(),
37+ "}),
4238 ))
4339 .await?;
4440
@@ -47,14 +43,12 @@ async fn test_selection_duplication() -> anyhow::Result<()> {
4743 platform_line(indoc! {"\
4844 test
4945 #[testitem|]#
50− "})
51− .as_str(),
46+ "}),
5247 "<A-C>",
5348 platform_line(indoc! {"\
5449 test
5550 #[testitem|]#
56− "})
57− .as_str(),
51+ "}),
5852 ))
5953 .await?;
6054
@@ -63,14 +57,12 @@ async fn test_selection_duplication() -> anyhow::Result<()> {
6357 platform_line(indoc! {"\
6458 test
6559 #[test|]#
66− "})
67− .as_str(),
60+ "}),
6861 "<A-C>",
6962 platform_line(indoc! {"\
7063 #[test|]#
7164 #(test|)#
72− "})
73− .as_str(),
65+ "}),
7466 ))
7567 .await?;
7668
@@ -79,14 +71,12 @@ async fn test_selection_duplication() -> anyhow::Result<()> {
7971 platform_line(indoc! {"\
8072 #[testitem|]#
8173 test
82− "})
83− .as_str(),
74+ "}),
8475 "C",
8576 platform_line(indoc! {"\
8677 #[testitem|]#
8778 test
88− "})
89− .as_str(),
79+ "}),
9080 ))
9181 .await?;
9282
@@ -95,14 +85,12 @@ async fn test_selection_duplication() -> anyhow::Result<()> {
9585 platform_line(indoc! {"\
9686 #[test|]#
9787 test
98− "})
99− .as_str(),
88+ "}),
10089 "C",
10190 platform_line(indoc! {"\
10291 #(test|)#
10392 #[test|]#
104− "})
105− .as_str(),
93+ "}),
10694 ))
10795 .await?;
10896 Ok(())
@@ -174,15 +162,13 @@ async fn test_multi_selection_paste() -> anyhow::Result<()> {
174162 #[|lorem]#
175163 #(|ipsum)#
176164 #(|dolor)#
177− "})
178− .as_str(),
165+ "}),
179166 "yp",
180167 platform_line(indoc! {"\
181168 lorem#[|lorem]#
182169 ipsum#(|ipsum)#
183170 dolor#(|dolor)#
184− "})
185− .as_str(),
171+ "}),
186172 ))
187173 .await?;
188174
@@ -197,8 +183,7 @@ async fn test_multi_selection_shell_commands() -> anyhow::Result<()> {
197183 #[|lorem]#
198184 #(|ipsum)#
199185 #(|dolor)#
200− "})
201− .as_str(),
186+ "}),
202187 "|echo foo<ret>",
203188 platform_line(indoc! {"\
204189 #[|foo\n]#
@@ -207,8 +192,7 @@ async fn test_multi_selection_shell_commands() -> anyhow::Result<()> {
207192
208193 #(|foo\n)#
209194
210− "})
211− .as_str(),
195+ "}),
212196 ))
213197 .await?;
214198
@@ -218,8 +202,7 @@ async fn test_multi_selection_shell_commands() -> anyhow::Result<()> {
218202 #[|lorem]#
219203 #(|ipsum)#
220204 #(|dolor)#
221− "})
222− .as_str(),
205+ "}),
223206 "!echo foo<ret>",
224207 platform_line(indoc! {"\
225208 #[|foo\n]#
@@ -228,8 +211,7 @@ async fn test_multi_selection_shell_commands() -> anyhow::Result<()> {
228211 ipsum
229212 #(|foo\n)#
230213 dolor
231− "})
232− .as_str(),
214+ "}),
233215 ))
234216 .await?;
235217
@@ -239,8 +221,7 @@ async fn test_multi_selection_shell_commands() -> anyhow::Result<()> {
239221 #[|lorem]#
240222 #(|ipsum)#
241223 #(|dolor)#
242− "})
243− .as_str(),
224+ "}),
244225 "<A-!>echo foo<ret>",
245226 platform_line(indoc! {"\
246227 lorem#[|foo\n]#
@@ -249,8 +230,7 @@ async fn test_multi_selection_shell_commands() -> anyhow::Result<()> {
249230
250231 dolor#(|foo\n)#
251232
252− "})
253− .as_str(),
233+ "}),
254234 ))
255235 .await?;
256236
@@ -294,16 +274,14 @@ async fn test_extend_line() -> anyhow::Result<()> {
294274 ipsum
295275 dolor
296276
297− "})
298− .as_str(),
277+ "}),
299278 "x2x",
300279 platform_line(indoc! {"\
301280 #[lorem
302281 ipsum
303282 dolor\n|]#
304283
305− "})
306− .as_str(),
284+ "}),
307285 ))
308286 .await?;
309287
@@ -313,15 +291,13 @@ async fn test_extend_line() -> anyhow::Result<()> {
313291 #[l|]#orem
314292 ipsum
315293
316− "})
317− .as_str(),
294+ "}),
318295 "2x",
319296 platform_line(indoc! {"\
320297 #[lorem
321298 ipsum\n|]#
322299
323− "})
324− .as_str(),
300+ "}),
325301 ))
326302 .await?;
327303
@@ -390,15 +366,15 @@ async fn test_character_info() -> anyhow::Result<()> {
390366async fn test_delete_char_backward() -> anyhow::Result<()> {
391367 // don't panic when deleting overlapping ranges
392368 test((
393− platform_line("#(x|)# #[x|]#").as_str(),
369+ platform_line("#(x|)# #[x|]#"),
394370 "c<space><backspace><esc>",
395− platform_line("#[\n|]#").as_str(),
371+ platform_line("#[\n|]#"),
396372 ))
397373 .await?;
398374 test((
399− platform_line("#( |)##( |)#a#( |)#axx#[x|]#a").as_str(),
375+ platform_line("#( |)##( |)#a#( |)#axx#[x|]#a"),
400376 "li<backspace><esc>",
401− platform_line("#(a|)##(|a)#xx#[|a]#").as_str(),
377+ platform_line("#(a|)##(|a)#xx#[|a]#"),
402378 ))
403379 .await?;
404380
@@ -409,9 +385,9 @@ async fn test_delete_char_backward() -> anyhow::Result<()> {
409385async fn test_delete_word_backward() -> anyhow::Result<()> {
410386 // don't panic when deleting overlapping ranges
411387 test((
412− platform_line("fo#[o|]#ba#(r|)#").as_str(),
388+ platform_line("fo#[o|]#ba#(r|)#"),
413389 "a<C-w><esc>",
414− platform_line("#[\n|]#").as_str(),
390+ platform_line("#[\n|]#"),
415391 ))
416392 .await?;
417393 Ok(())
@@ -421,9 +397,9 @@ async fn test_delete_word_backward() -> anyhow::Result<()> {
421397async fn test_delete_word_forward() -> anyhow::Result<()> {
422398 // don't panic when deleting overlapping ranges
423399 test((
424− platform_line("fo#[o|]#b#(|ar)#").as_str(),
400+ platform_line("fo#[o|]#b#(|ar)#"),
425401 "i<A-d><esc>",
426− platform_line("fo#[\n|]#").as_str(),
402+ platform_line("fo#[\n|]#"),
427403 ))
428404 .await?;
429405 Ok(())
@@ -437,16 +413,14 @@ async fn test_delete_char_forward() -> anyhow::Result<()> {
437413 #(abc|)#ef
438414 #(abc|)#f
439415 #(abc|)#
440− "})
441− .as_str(),
416+ "}),
442417 "a<del><esc>",
443418 platform_line(indoc! {"\
444419 #[abc|]#ef
445420 #(abc|)#f
446421 #(abc|)#
447422 #(abc|)#
448− "})
449− .as_str(),
423+ "}),
450424 ))
451425 .await?;
452426