diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-02-11 09:57:53 +0700 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-02-11 09:57:53 +0700 |
commit | 18ce7932e3dba76305dda202b3181763e54c4a50 (patch) | |
tree | 415245ce1be6bbebfd5fea25038621d561678ee1 /test | |
parent | cc95beb520981f0ed855d739a523675932907662 (diff) | |
download | vyconf-18ce7932e3dba76305dda202b3181763e54c4a50.tar.gz vyconf-18ce7932e3dba76305dda202b3181763e54c4a50.zip |
Rename Util.string_of_path to string_of_list since it can be used for any lists,
not just config tree paths.
Add analogous function for converting a list of strings to JSON.
Diffstat (limited to 'test')
-rw-r--r-- | test/util_test.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/util_test.ml b/test/util_test.ml index 58fd6e9..2f5bf5d 100644 --- a/test/util_test.ml +++ b/test/util_test.ml @@ -14,15 +14,15 @@ let test_find_xml_child_nonexistent test_ctxt = let elem = Xml.Element ("foo", [], [Xml.Element ("quux", [], [])]) in assert_equal (find_xml_child "bar" elem) None -let test_string_of_path test_ctxt = +let test_string_of_list test_ctxt = let path = ["foo"; "bar"; "baz"] in - assert_equal (String.trim (string_of_path path)) "foo bar baz" + assert_equal (String.trim (string_of_list path)) "foo bar baz" let suite = "Util tests" >::: [ "test_find_xml_child_existent" >:: test_find_xml_child_existent; "test_find_xml_child_nonexistent" >:: test_find_xml_child_nonexistent; - "test_string_of_path" >:: test_string_of_path; + "test_string_of_path" >:: test_string_of_list; ] let () = |