fix: sequence formatting when not top level

This commit is contained in:
rvcas
2023-11-18 16:48:28 -05:00
committed by Lucas
parent 1567e42875
commit 6869f73033
5 changed files with 95 additions and 32 deletions

View File

@@ -62,6 +62,31 @@ fn format_if() {
);
}
#[test]
fn format_logic_op_with_code_block() {
assert_format!(
r#"
fn foo() {
True || {
let bar = 1
bar == bar
}
}
"#
);
}
#[test]
fn format_grouped_expression() {
assert_format!(
r#"
fn foo() {
y == { x |> f }
}
"#
);
}
#[test]
fn format_validator() {
assert_format!(

View File

@@ -0,0 +1,11 @@
---
source: crates/aiken-lang/src/tests/format.rs
description: "Code:\n\nfn foo() {\n True || {\n let bar = 1\n bar == bar\n }\n}\n"
---
fn foo() {
True || {
let bar = 1
bar == bar
}
}