diff options
| author | Young-Flash <dongyang@apache.org> | 2025-06-30 17:27:07 +0800 |
|---|---|---|
| committer | Young-Flash <dongyang@apache.org> | 2025-06-30 17:36:16 +0800 |
| commit | 594252fdc4a3ec5a3db94df5a2f4697a63e61283 (patch) | |
| tree | cea5d97dcb5ce58ec330fdd805668a12c5a2a728 | |
| parent | e0e21dd939dfde5549dccaa638a28710b8cf7ed4 (diff) | |
| download | rust-594252fdc4a3ec5a3db94df5a2f4697a63e61283.tar.gz rust-594252fdc4a3ec5a3db94df5a2f4697a63e61283.zip | |
test: add test case for func with multiline param list
| -rwxr-xr-x | src/tools/rust-analyzer/crates/ide/src/folding_ranges.rs | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/folding_ranges.rs b/src/tools/rust-analyzer/crates/ide/src/folding_ranges.rs index 7ac160dac2e..c081796d078 100755 --- a/src/tools/rust-analyzer/crates/ide/src/folding_ranges.rs +++ b/src/tools/rust-analyzer/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> "#, ) } |
