chore: add fmt test for validator

This commit is contained in:
rvcas 2023-02-15 21:30:45 -05:00 committed by Lucas
parent 2e78b7100c
commit 8b4985498b
1 changed files with 21 additions and 0 deletions

View File

@ -55,6 +55,27 @@ fn test_format_if() {
assert_fmt(src, expected) 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] #[test]
fn test_format_when() { fn test_format_when() {
let src = indoc! {r#" let src = indoc! {r#"