Unnamed repository; edit this file 'description' to name the repository.
test: add test case for func with multiline param list
Young-Flash 10 months ago
parent 5ae6774 · commit d94a832
-rwxr-xr-xcrates/ide/src/folding_ranges.rs21
1 files changed, 19 insertions, 2 deletions
diff --git a/crates/ide/src/folding_ranges.rs b/crates/ide/src/folding_ranges.rs
index 7ac160dac2..c081796d07 100755
--- a/crates/ide/src/folding_ranges.rs
+++ b/crates/ide/src/folding_ranges.rs
@@ -361,6 +361,23 @@ mod tests {
}
#[test]
+ fn test_fold_func_with_multiline_param_list() {
+ check(
+ r#"
+<fold function>fn func<fold arglist>(
+ a: i32,
+ b: i32,
+ c: i32,
+)</fold> <fold block>{
+
+
+
+}</fold></fold>
+"#,
+ );
+ }
+
+ #[test]
fn test_fold_comments() {
check(
r#"
@@ -572,10 +589,10 @@ const _: S = S <fold block>{
fn fold_multiline_params() {
check(
r#"
-fn foo<fold arglist>(
+<fold function>fn foo<fold arglist>(
x: i32,
y: String,
-) {}</fold>
+)</fold> {}</fold>
"#,
)
}