diff options
Diffstat (limited to 'tests/configuration_toml.ml')
-rw-r--r-- | tests/configuration_toml.ml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/configuration_toml.ml b/tests/configuration_toml.ml index dc1f769..e51c727 100644 --- a/tests/configuration_toml.ml +++ b/tests/configuration_toml.ml @@ -2,6 +2,29 @@ module Expression = ImportExpression.T module Path = ImportDataTypes.Path open Test_migration +let nested_group () = + let expected = + Error + "in field \"sheet\":\n\ + \ in field \"columns\":\n\ + \ while decoding a list:\n\ + \ element 0:\n\ + \ A group function cannot contains another group function, but got\n\ + \ \"max(:A, [counter([:A], [:A])], [])\" \n" + and result = + ConfLoader.load' + {|[source] +name = "source_name" +file = "source_file" + +[sheet] +columns = [ + "max(:A, [counter([:A], [:A])], [])", +]|} + in + Alcotest.(check (result Test_migration.syntax string)) + "duplicate" expected result + let test_suit = [ ( "parse_extern" >:: fun _ -> @@ -63,6 +86,7 @@ let test_suit = let toml = Otoml.Parser.from_file "configuration/example_csv.toml" in let toml = ImportConf.t_of_toml toml in ignore toml ); + ("nested group", `Quick, nested_group); ] let tests = "configuration_toml" >::: test_suit |