diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2024-03-14 08:26:58 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2024-03-14 08:26:58 +0100 |
commit | 6b377719c10d5ab3343fd5221f99a4a21008e25a (patch) | |
tree | a7c1e9a820d339a2f161af3e09cf9e3161286796 /tests/importConf_test.ml |
Initial commitmain
Diffstat (limited to 'tests/importConf_test.ml')
-rw-r--r-- | tests/importConf_test.ml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/importConf_test.ml b/tests/importConf_test.ml new file mode 100644 index 0000000..c94eb91 --- /dev/null +++ b/tests/importConf_test.ml @@ -0,0 +1,23 @@ +open OUnit2 +open ConfLoader + +(** Test the dependencies extracted from the external named "source". + + Refer to the default configuration used in [ConfLoader] to see the + configuration. + *) +let test_get_dependencies_for_source = + "get_dependancies_for_table" >:: fun _ -> + let result = ImportConf.get_dependancies_for_table conf conf.source + and expected = [ external_other ] in + assert_equal ~printer:pp_externals expected result + +let test_get_dependencies_for_other = + "get_dependancies_for_table" >:: fun _ -> + let result = ImportConf.get_dependancies_for_table conf external_table_other + and expected = [ external_last ] in + assert_equal ~printer:pp_externals expected result + +let tests = + "importConf_test" + >::: [ test_get_dependencies_for_source; test_get_dependencies_for_other ] |