diff --git a/crates/aiken-lang/src/tests/format.rs b/crates/aiken-lang/src/tests/format.rs index 76b09a0b..eaf55e0a 100644 --- a/crates/aiken-lang/src/tests/format.rs +++ b/crates/aiken-lang/src/tests/format.rs @@ -55,6 +55,27 @@ fn test_format_if() { assert_fmt(src, expected) } +#[test] +fn test_format_validator() { + let src = indoc! {r#" + validator foo ( ) { + fn(d: Datum, r: Redeemer, ctx: ScriptContext) -> Bool { + True + } + } + "#}; + + let expected = indoc! {r#" + validator foo { + fn(d: Datum, r: Redeemer, ctx: ScriptContext) -> Bool { + True + } + } + "#}; + + assert_fmt(src, expected) +} + #[test] fn test_format_when() { let src = indoc! {r#"