aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests/test/auto_indent.rs
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-04-30 13:22:20 +0000
committerSkyler Hawthorne2022-06-19 03:57:47 +0000
commit8d8d389536d1f948f25a38c33f278a5e2f8d1b28 (patch)
tree2afc76c77472a39997e785f33232b6b224d01632 /helix-term/tests/test/auto_indent.rs
parentacf931709a56e5af0ac101276fcfb3ba45f159f2 (diff)
rename top level module to satisfy cargo fmt
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..8933cb6a
--- /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_key_sequence_text_result(
+ 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(())
+}