diff --git a/src/tests.rs b/src/tests.rs index c947d1a227..056cac1a93 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -447,6 +447,14 @@ fn hide_twice_not_allowed() -> TestResult { ) } +#[test] +fn def_twice_should_fail() -> TestResult { + fail_test( + r#"def foo [] { "foo" }; def foo [] { "bar" }"#, + "defined more than once", + ) +} + #[test] fn from_json_1() -> TestResult { run_test(r#"('{"name": "Fred"}' | from json).name"#, "Fred")