aboutsummaryrefslogtreecommitdiff
path: root/helix-core/tests
diff options
context:
space:
mode:
authorDaniel Ebert2023-09-16 16:22:46 +0000
committerBlaž Hrastnik2023-12-15 06:59:54 +0000
commitd29a66f267afd79f83c0ddc2e483bfb407f4ed98 (patch)
tree2cda470baf199de6091cf290ea7f93e0b57240c5 /helix-core/tests
parent23fd145a56260293072622c4d64482fc6447af7c (diff)
Implement relative indent queries,
i.e. also take into account the indentation of a previous line when computing the indentation for a new line.
Diffstat (limited to 'helix-core/tests')
-rw-r--r--helix-core/tests/indent.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-core/tests/indent.rs b/helix-core/tests/indent.rs
index 26010c90..cd96fcff 100644
--- a/helix-core/tests/indent.rs
+++ b/helix-core/tests/indent.rs
@@ -210,7 +210,6 @@ fn test_treesitter_indent(
let suggested_indent = treesitter_indent_for_pos(
indent_query,
&syntax,
- &indent_style,
tab_width,
indent_style.indent_width(tab_width),
text,
@@ -218,7 +217,8 @@ fn test_treesitter_indent(
text.line_to_char(i) + pos,
false,
)
- .unwrap();
+ .unwrap()
+ .to_string(&indent_style);
assert!(
line.get_slice(..pos).map_or(false, |s| s == suggested_indent),
"Wrong indentation for file {:?} on line {}:\n\"{}\" (original line)\n\"{}\" (suggested indentation)\n",