@@ -132,6 +132,70 @@ async fn test_selection_duplication() -> anyhow::Result<()> {
132132 .as_str(),
133133 ))
134134 .await?;
135+
136+ // Copy the selection to previous line, skipping the first line in the file
137+ test((
138+ platform_line(indoc! {"\
139+ test
140+ #[testitem|]#
141+ "})
142+ .as_str(),
143+ "<A-C>",
144+ platform_line(indoc! {"\
145+ test
146+ #[testitem|]#
147+ "})
148+ .as_str(),
149+ ))
150+ .await?;
151+
152+ // Copy the selection to previous line, including the first line in the file
153+ test((
154+ platform_line(indoc! {"\
155+ test
156+ #[test|]#
157+ "})
158+ .as_str(),
159+ "<A-C>",
160+ platform_line(indoc! {"\
161+ #[test|]#
162+ #(test|)#
163+ "})
164+ .as_str(),
165+ ))
166+ .await?;
167+
168+ // Copy the selection to next line, skipping the last line in the file
169+ test((
170+ platform_line(indoc! {"\
171+ #[testitem|]#
172+ test
173+ "})
174+ .as_str(),
175+ "C",
176+ platform_line(indoc! {"\
177+ #[testitem|]#
178+ test
179+ "})
180+ .as_str(),
181+ ))
182+ .await?;
183+
184+ // Copy the selection to next line, including the last line in the file
185+ test((
186+ platform_line(indoc! {"\
187+ #[test|]#
188+ test
189+ "})
190+ .as_str(),
191+ "C",
192+ platform_line(indoc! {"\
193+ #(test|)#
194+ #[test|]#
195+ "})
196+ .as_str(),
197+ ))
198+ .await?;
135199 Ok(())
136200}
137201