aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests/test/auto_indent.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/tests/test/auto_indent.rs')
-rw-r--r--helix-term/tests/test/auto_indent.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/helix-term/tests/test/auto_indent.rs b/helix-term/tests/test/auto_indent.rs
new file mode 100644
index 00000000..2f638893
--- /dev/null
+++ b/helix-term/tests/test/auto_indent.rs
@@ -0,0 +1,26 @@
+use super::*;
+
+#[tokio::test]
+async fn auto_indent_c() -> anyhow::Result<()> {
+ test_with_config(
+ Args {
+ files: vec![(PathBuf::from("foo.c"), Position::default())],
+ ..Default::default()
+ },
+ Config::default(),
+ // switches to append mode?
+ (
+ helpers::platform_line("void foo() {#[|}]#").as_ref(),
+ "i<ret><esc>",
+ helpers::platform_line(indoc! {"\
+ void foo() {
+ #[|\n]#\
+ }
+ "})
+ .as_ref(),
+ ),
+ )
+ .await?;
+
+ Ok(())
+}