diff options
Diffstat (limited to 'test/reference_tree_test.ml')
-rw-r--r-- | test/reference_tree_test.ml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/reference_tree_test.ml b/test/reference_tree_test.ml index aea654d..8ffc079 100644 --- a/test/reference_tree_test.ml +++ b/test/reference_tree_test.ml @@ -61,6 +61,17 @@ let test_validate_path_valueless_node_valid test_ctxt = assert_equal (validate_path (get_dir test_ctxt) r ["system"; "options"; "reboot-on-panic"]) (["system"; "options"; "reboot-on-panic"], None) +let test_is_multi_valid test_ctxt = + let r = Vytree.make default_data "root" in + let r = load_from_xml r (in_testdata_dir test_ctxt ["interface_definition_sample.xml"]) in + assert_equal (is_multi r ["system"; "ntp-server"]) true + +let test_is_multi_invalid test_ctxt = + let r = Vytree.make default_data "root" in + let r = load_from_xml r (in_testdata_dir test_ctxt ["interface_definition_sample.xml"]) in + assert_equal (is_multi r ["system"; "host-name"]) false + + let suite = "Util tests" >::: [ "test_load_valid_definition" >:: test_load_valid_definition; @@ -73,6 +84,8 @@ let suite = "test_validate_path_garbage_after_value" >:: test_validate_path_garbage_after_value; "test_validate_path_valueless_node_with_value" >:: test_validate_path_valueless_node_with_value; "test_validate_path_valueless_node_valid" >:: test_validate_path_valueless_node_valid; + "test_is_multi_valid" >:: test_is_multi_valid; + "test_is_multi_invalid" >:: test_is_multi_invalid; ] let () = |