aboutsummaryrefslogtreecommitdiff
path: root/tests/importConf_test.ml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/importConf_test.ml')
-rw-r--r--tests/importConf_test.ml23
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 ]